Windows resets the IDLE time every time the user touches the keyboard or the mouse. My application needs to reset the IDLE time at specific moments, but i can’t figure out how to do this programmatically.
The following does NOT reset the IDLE time using VB, C# or QT4.
– Programmatic mouse movement / click.
– Programmatic keystroke.
Somehow Windows knows these actions are simulated.
How can i reset the IDLE time? Any thoughts will be greatly appreciated!
Use SetThreadExecutionState(). The ES_SYSTEM_REQUIRED option (2) resets the system idle timer. Visit pinvoke.net for the required declarations.