views:

125

answers:

1

Hi All, I've been trying to implement a long-press feature on a Tablet PC (Windows 7). The problem is I don't get the MouseDown event when touching the tablet (touch and wait).

I do get a MouseDown event only after I move my finger (dragging). And when I pick it up after a while, only then do I get both down and up events at the same time.

I have found out that this problem is happening due to the "Hold-through" gesture, mentioned here: http://msdn.microsoft.com/en-us/library/ms703320%28VS.85%29.aspx

I want to disable this gesture, the same way they do it with press and hold: hxxp:...microsoft.com/en-us/library/bb969148%28VS.85%29.aspx

I have implemented the press and hold gesture disable successfully, but nowhere could I find how to disable the Hold Through gesture.

Maybe it is done the same way but with different constant.

I would really appreciate your help on this.

Thank you, BJoe

A: 

I came up with this solution:

private IntPtr WndProc(IntPtr hwnd, int msg, IntPtr wParam, IntPtr lParam, ref bool handled) { if (msg == 716) //Tablet touched { //Tablets on first touch send this instead of mouse down /Handle message/ } return IntPtr.Zero; }

BJoe