Touch on capacitive LCD

Hi everyone again…
As I can’t understand what I’m doing wrong with GLIDE to obtain all these GC errors, I finally decided to develop the same application using plain NETMF…

I started using GLIDE only because I’ve found some examples in this forum on how to feed GLIDE with touch events using capacitive screen, but did not find anything explaining how to obtain the same using plain NETMF…

So the question is : how to feed my app with the touch events coming from my LCD screen ?

Thank you again!

As I said on the other thread… you don’t have GC errors.

What LCD screen do you have?

Hi everyone and thank you for your help.
I have a NewHeaven 4.3" capacitive screen.
Would be nice for me to learn how to feed a plain NETMF app with touches… I mean not to develop a driver for this screen (thank you to Dave_McLaughlin for his wonderful driver!), but how to pass the touch events to the app, so that the controls on the app itself know they have been pressed etc…, something like the “GlideTouch.RaiseTouchDownEvent” of Glide…
Thank you everyone!

So of course there must be some driver. It seems you are using something you received from Mike.

That driver, if applicable will know that the touch occurred. If you want it to trigger an event then you should extend the driver with a delegate and an event. Then in another part of your app where you want to process that you subscribe to the event.

Something like this perhaps?

In Driver Class:

public delegate void TouchReceivedDelagate (int Xpos, int Ypos);
public event TouchReceivedDelagate TouchReceived;

In Driver Class when a touch is received:

TouchReceived( Xpos, Ypos ); // trigger the event and pass the touch location to any subcribers

In another part of your app where you initialize functionality and want to process touch events:

DriverClass.TouchReceived += HandleTouchInput;

Now in the same class that this was initialized in you can Handle the input:

void HandleTouchInput(int Xpos, int Ypos)
    // process the event

If at any point you want to stop processing the event but don’t want to affect the driver you can:

DriverClass.TouchReceived -= HandleTouchInput;

Hope this is relevant and useful information.

Hi jwizard93, thank you for your suggestion, but perhaps i have not been clear enough…

What you describe is exactly what I already do in my GLIDE application from the driver side. My question is:
using Glide, in my application delegate function responding to the DouchDown event, for example, I’m calling the specific function “GlideTouch.RaiseTouchDownEvent”. This function handles all the magic inside and if i touch over a button, the button is pressed and raises the Button Tap event automatically…
I don’t have to do anything to discover that below the touch coordinates there is a button, everything is handled by Glide…
I was wondering if there is a corresponding function in NETMF, or do I have to handle the touch coordinates by myself and discover which control is at those coordinates etc etc…

Oh okay I misunderstood.

hmm… some research suggests that you aren’t the first person to try this. Seems the options easily discover-able are sticking with Glide, finding a library already written for this purpose (maybe even in the Codeshare), or through Netmf with WPF and Touch class?

I hope you find what you are looking for.

Why aren’t you happy to keep using Glide? Glide is just a framework for doing exactly what you want - you can either code it yourself or use Glide. Glide is a netmf app…

No need to do anything with the touch points. Just let the driver pass them to Glide and everything will work. You can make some really nice GUI’s with Glide and it’s quick.

There was also a really nice designer created by the late Pasi Elo, know as Blackdogspark on the forum. I can’t seem to locate this anymore online but I do have a copy of this so here is the link to the last version he released. It has some bugs but is usable and sadly we were unable to get the source before he passed away.


Hi everyone,
sorry for the delay… Thanks for all your answers and your help!

Now that the GC problem I had has been solved (see the other post), I have no problem using Glide!
Was just curious to know how the same goal could be achieved without glide, using plain NETMF app.
Thanks to Dave for the link!


And just to reiterate - Glide is just netmf code to handle this for you, and if you wanted to you could write an equivalent

Let us not forget the Microsoft.SPOT.Presentation.X namespaces. These support a GUI framework which is part of MF, and is similar to WPF.

I guess that the performance of it was so bad that nobody used, and it has been forgotten.