Using Touch Screen Monitor with Raptor

I have a 10" Touch Screen with VGA and the Video Out module along with a USB Host module. How can I connect the USB cable from the monitor to the USB Host and be able to detect screen touches. Or isn’t this possible? It’s a generic touch screen, basically it emulates a mouse. I’m using Glide in my app.

There is an HID MOUSE USB driver so you can use this and then hook into Glide with this.


Microsoft.SPOT.Touch.TouchInput[] touches;  // You can make these global
touches[0] = new TouchInput();
//
// Now pass the touch to Glide
//
touches[0].X = mouse.x;
touches[0].Y = mouse.y;

GlideTouch.RaiseTouchDownEvent(null, new TouchEventArgs(touches));

Dave,

I get that I need to have the 1st 2 lines as Global (top of my code)

Where do I put the rest? In an event?

Thanks

It depends on how you manage the mouse input. I’ve not used this so don’t know what solution to offer. I suggest you call the event I show when you get a mouse DOWN and a MOUSE up status. There is also an up one as I only show the down one.