WM_Gesture in Win7+Forms. No GF_END?! WM_Touch - not for Controls inside a form? RRS feed

  • Question

  • Hello

    I'm developing a multitouch solution for an older software system written in C#,.NET3.5 and Windows Forms. I need to change Panels like in Android by a gesture. The user can move the panel left and right and if he lifts the finger up, the panel jumps back or it jumps to the next page (with a smooth animation).

    The Sample MTGesture with the rectangle you can move around helped me a lot and i used most of the code.

    I'm doing it like this at the moment:


    -Making Screenshots of the actual and the next panel and stick them together

    - show this Screenshot over the form

    Default: if a screenshot is shown, move it to the actual finger position -> works fine!


    if the user moved the screenshot less then 10% of the width, i go into a loop and move the screenshot back, delete it and you have the same panel like before.

    if the user moved it more then 10% of the width, its moving to the next page, the panels in the background are changed and the screenshot is deleted - so you are on the next page.


    sometimes the GF_End isn't called... most times when you nudge with your finger... just the Defaultmessage - i never get an END. So i cannot switch to another panel and the animation sticks...

    I tried to use WM_TOUCH + wm_gesture. I wanted to use the touch message to know if there is no finger any more on the screen - i can use this also as a END. but WM_Touch seems to work only in the form. if there is any control inside this form, i get no message if i touch inside the form!? It works only if i extend all of the controls - but thats no oportunity for us... is there a solution to get the message for every touch inside the form and all its subcontrols?

    Please help me!

    Monday, March 25, 2013 3:11 PM

All replies

  • Hello,

    I might have the same problem. I use gesture panning to let the user move Bitmaps (Sprites) around.
    It can be reproduced using a touchscreen pen.
    When you put the pen on the Sprite, drag it, stop still holding the pen down, then lift the pen, you always get a GF_END.
    But when you put the pen on the Sprite, quickly drag it and lifting the pen while still dragging, you dont get a GF_END.

    Is there an other way to be informed that panning ended?

    Tuesday, April 30, 2013 7:54 AM