cugel
November 9, 2010, 2:33pm
1
Hi,
the Beginners guide to NetMF is a wonderful source of information but some useful parts are missing.
After hours of search, I did not succeeded to have a working solution for the TouchScreen.
Can you post something, even if it’s a preliminary text, for part “34.7 Touch Screen” of the guide, please ?
Thanks a lot.
IanR
November 9, 2010, 2:41pm
2
In the samples folder in “microsoft.net4.1” (in your documents) load and deploy the drawing application (its like windows paint, but with touch) there is enough code to get you started.
Cheers Ian
Sorry … Its called ink canvas sample… There is also a simple touch demo.
IanR
November 9, 2010, 4:12pm
4
Glad to be of help… When you’ve messed about with touch and gotten to grips with it, you can help me with gesture’s…
Cheers Ian
cugel
November 9, 2010, 5:10pm
5
do you know if it is possible to use the OnTouchDown event without creating a window?
cugel
November 9, 2010, 5:23pm
6
I tried this but it crashes…
public static void Main()
{
main_app=new Program();
Microsoft.SPOT.Touch.Touch.Initialize(main_app);
main_app.MainWindow.TouchDown+=new TouchEventHandler(Evt_TouchDown);
while (true)
{
Thread.Sleep(Timeout.Infinite);
}
}
static void Evt_TouchDown(object sender,TouchEventArgs e)
{
int x=0;
int y=0;
e.GetPosition((UIElement)sender,0,out x,out y);
Debug.Print(x.ToString()+","+y.ToString());
}
User_5
November 10, 2010, 9:53am
7
What do you mean crash?
Just try already made NETMF example in SDK. It should work fine and then go from there.
This is the official GHI demo which includes touchscreen and windowed applications. You might want to have a look at it