HOWTO: How to Disable the Screen Saver Programmatically (126627)
The information in this article applies to:
- Microsoft Win32 Application Programming Interface (API), when used with:
- Microsoft Windows NT Server 3.5
- Microsoft Windows NT Server 3.51
- Microsoft Windows NT Workstation 3.5
- Microsoft Windows NT Workstation 3.51
This article was previously published under Q126627
3.50 3.51
WINDOWS NT
kbgraphic
SUMMARY
Under Windows NT, you can disable the screen saver from your application
code. To detect if the screen saver is enabled, use this:
SystemParametersInfo( SPI_GETSCREENSAVEACTIVE,
0,
pvParam,
0
);
On return, the parameter pvParam will point to TRUE if the screen saver
setting is enabled in the System control panel applet and FALSE if the
screen saver setting is not enabled.
To disable the screen saver setting, call SystemParametersInfo() with this:
SystemParametersInfo( SPI_SETSCREENSAVEACTIVE,
FALSE,
0,
SPIF_SENDWININICHANGE
);
Modification Type: | Minor | Last Reviewed: | 3/7/2005 |
---|
Keywords: | kbhowto KB126627 |
---|
|