Detecting that the user is away from the PC with .NET

前端 未结 4 951
借酒劲吻你
借酒劲吻你 2020-12-20 04:10

I have a desktop application in which I would like to know two things:

  1. Is the user currently on the PC (more specifically, is he giving any input to the PC), s
4条回答
  •  挽巷
    挽巷 (楼主)
    2020-12-20 04:31

    http://dataerror.blogspot.com/2005/02/detect-windows-idle-time.html

    ^ Detect Windows Idle Time. :)

    The enabler for this feature is the GetLastInputInfo() Win32 API and the LASTINPUTINFO Win32 structure.

提交回复
热议问题