Meteoric Stream - Original Apps & Music, Piano Instrumental, Children music, Hymns


Japanese | English
Meteoric Stream -> Documentation -> C/C++, C#, WIN32API -> [WIN32API] Screen saver on/off control with C language

[WIN32API] Screen saver on/off control with C language

Below C language code is for on/off control or checking of screen saver.
I wrote this code on lcc-win32, so it needs some fix on Visual C++ or something.
#include void main() { int re; //GetScreenSaverActive SystemParametersInfo(SPI_GETSCREENSAVEACTIVE,0,&re,0); //SetScreenSaverActive SystemParametersInfo(SPI_SETSCREENSAVEACTIVE,(re)?0:1,0, SPIF_UPDATEINIFILE|SPIF_SENDWININICHANGE); //InfoMessage if(re) { MessageBox(NULL,"Screen Saver: Off",ver,MB_OK); } else { MessageBox(NULL,"Screen Saver: On",ver,MB_OK); } }

Lastupdated:2017/11/15
Wrote by:2017/10/30

Share this article

Related




Go To Documentation Top
Meteoric Stream -> Documentation -> C/C++, C#, WIN32API -> [WIN32API] Screen saver on/off control with C language
Go to Top