active screensaver Programmatically
C / C++ / MFC
2
Posts
2
Posters
0
Views
1
Watching
-
Does anyone can tell me how to active the screensaver programmatically on MS Windows platform?
You can use
SystemParametersInfo(SPI_SETSCREENSAVETIMEOUT,1,0,SPIF_SENDWININICHANGE);
to change the screensaver timeout thus triggering it after one second. Setting the timout to zero does not seem to work, so you'll have a minimum delay of one second. Don't forget to change the timeout back to a normal value when you're done ;)