Main Site Documentation

Please complete the "Touch Screen" chapter in the "Beginners guide to NetMF"


#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.


#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.


#3

perfect, thanks.


#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


#5

do you know if it is possible to use the OnTouchDown event without creating a window?


#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());
}

#7

What do you mean crash?
Just try already made NETMF example in SDK. It should work fine and then go from there.


#8

This is the official GHI demo which includes touchscreen and windowed applications. You might want to have a look at it :slight_smile: