开发者

Enable ScreenSaver after other applications turn it off

开发者 https://www.devze.com 2022-12-10 05:23 出处:网络
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

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. I开发者_运维问答s there a simple API call to turn on the screensaver and powersave mode again?


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);
0

精彩评论

暂无评论...
验证码 换一张
取 消