views:

698

answers:

1

Looking for a way to detect finger gestures in my Windows Mobile applications. Main goal: detect when user gestures a left or right swipe across the screen. Similar to the swipe motion used to unlock an iPhone.

+2  A: 

Set a flag when a MouseDown event occurs, storing the position as well.

  1. If you wish to react before the user removes his finger from the screen, listen to MouseMove events, and check the direction and distance relative to the MouseDown event that you require for an action to take place.
  2. If you wish to wait for the user to remove his finger from the screen first, listen to MouseUp events and check the direction and distance.
Tormod Fjeldskår
Those would be the basic steps, yes. But then the fun starts in interpreting the results, translating into command (messages) and suppressing the normal commands trhe mouse generates.
Henk Holterman