1

I found these answers to how to create an auto-logout in a WinForms app. In this part of the answer, what should I use for monitor messages from a touchscreen (or do the also work)?

 public bool PreFilterMessage(ref Message m) {
        // Monitor message for keyboard and mouse messages
        bool active = m.Msg == 0x100 || m.Msg == 0x101;  // WM_KEYDOWN/UP
        active = active || m.Msg == 0xA0 || m.Msg == 0x200;  // WM_(NC)MOUSEMOVE
        active = active || m.Msg == 0x10;  // WM_CLOSE, in case dialog closes
        if (active) {
            if (!mTimer.Enabled) label1.Text = "Wakeup";
            mTimer.Enabled = false;
            mTimer.Start();
        }
        return false;
    }
  • 1
    https://stackoverflow.com/questions/11245551/how-to-get-touchscreen-to-use-mouse-events-instead-of-touch-events-in-c-sharp-ap – engineer_7 Oct 12 '17 at 07:05

0 Answers0