How to start a thread when the computer is idle, no user input on keyboard and mouse at the specific time.
Just like a starting screen saver but it work is not a screen saver.
I do not want to global hook the keyboard and mouse message!
Because the antivirus program usually warn the user that my application is a key logger!!
Posted on 2008-04-26 03:48:20 by sonthakit
Try this...

Posted on 2008-04-26 08:43:35 by donkey
Thank for advice. But it is not work because it is not the user inactive time, it is a user inactive time for that process.

This function is useful for input idle detection. However, GetLastInputInfo does not provide system-wide user input information across all running sessions. Rather, GetLastInputInfo provides session-specific user input information for only the session that invoked the function.

Posted on 2008-04-26 10:08:00 by sonthakit
you're looking for the broadcast WMs for user idle, powerdown etc
Posted on 2008-04-26 10:40:26 by Homer
I haven't tried the raw input functions yet, I was going to get around to it one day. But as far as I know they are focus independant and will send mouse and keyboard data directly to your application via the WM_INPUT message. Using this you can probably set up your own timing and monitoring thread that can do what you need...
Posted on 2008-04-26 23:03:36 by donkey