I\'m writing code that need to run only when there is no human activity on the PC, like when the screensaver is running. Any suggestions on how to do this in c++ under windows?<
Use SystemParametersInfo(...)
private const int SPI_GETSCREENSAVERACTIVE = 16; SystemParametersInfo( SPI_GETSCREENSAVERACTIVE, 0, ref isActive, 0 ); return isActive;
Reference: http://www.codeproject.com/KB/cs/ScreenSaverControl.aspx