I have several applications that seem to turn off the screensaver and the powersave mode of the video card (eg Skype, VLC, mplayer, etc). Sometimes, these applications crash and the monitor is just on all the time until I reboot. Is there a simple API call to turn on the screensaver and powersave mode again?
A:
These applications probably use SystemParametersInfo to turn off the screensaver, so you can use it yourself to change back. Here are the calls you may have to do:
SystemParametersInfo(SPI_SETLOWPOWERTIMEOUT,power timeout you want, NULL, 0);
SystemParametersInfo(SPI_SETPOWEROFFTIMEOUT, poweroff timeout you want, NULL, 0);
SystemParametersInfo(SPI_SETSCREENSAVETIMEOUT,screensaver timeout you want, NULL, 0);
Géal
2009-11-06 12:22:19