Search code examples
c#touchscreen

Can a MouseMove EventHandler be triggerd with use of touchscreen?


I write a WindowsForms-GUI for a touchscreen and used the auto-logout Code from How can I trigger an auto-logout within a Windows Forms Application? but i'm wondering if a tochscreen can trigger a MouseMoveEvent(Dont have a touchscreen to test). I figuered out that for WPF there are extra Touchevents, does anyone knows how it works with Forms Applications??


Solution

  • Touch screens have a driver that emulates a mouse. A touch generates a left button down event. Then moving your finger generates mouse move events. Retracting your finger generates a mouse up event. Tapping twice in the same spot generates a double-click.

    What you don't get are mouse move events without a button down event. Right button clicks are difficult and require some kind of finger gymnastic, driver dependent. Don't use them. Do make sure you design the user interface for fat fingers, make things to click at least as wide as your thumb.