English 中文(简体)
Windows Tablet Event - disable Hold Through gesture
原标题:

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

问题回答

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; }





相关问题
HTML APIs for touch devices?

What HTML APIs are available for touch screen devices (e.g. tablet PCs)? I notice that GMail s iPad interface (and other mobile interfaces) doesn t scroll down in a normal web browser (pretending to ...

Tablet PC/WPF textbox bug - any workarounds?

I ve just logged this with Microsoft Connect, but I m wondering whether anyone else has come across it and found a fix. Google s not showing much... Simple repro: Application has a WPF textbox with ...

Windows Tablet Event - disable Hold Through gesture

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

windows xp tablet pc sdk on mono

I ve been in development of an app that utilizes the windows tablet pc sdk. The only thing I really use from it is the InkPicture control. I m wondering, the InkPicture control obviously isn t built ...

Help me convert the following VB/C++ code to C#

I have been trying to get the following VB code running in C# for hours now. I keep getting a Value does not fall within the expected range. exception on the CreateStroke() call. Also, here is the ...

Recording and storing high-res hand drawing

Are there any advanced solutions for capturing a hand drawing (from a tablet, touch screen or iPad like device) on a web site in JavaScript, and storing it on server side? Essentially, this would be ...

Winforms app which must include some freehand drawing

We have a customer who needs some simple forms (probably we would be creating a simple Winforms app for them) but there is a requirement to capture a mix of input fields plus some freehand drawing. It ...

热门标签