How to detect inactive user

后端 未结 4 701
醉梦人生
醉梦人生 2020-12-12 18:09

How to detect inactive (idle) user in Windows application? I\'d like to shutdown application when there hasn\'t been any input (keyboard, mouse) from user for certain period

4条回答
  •  旧时难觅i
    2020-12-12 18:50

    This SecondsIdle doens't work at all. The way is to use a TTimer combined with a second variable that resets every time user inputs mouse or keyboard.

提交回复
热议问题