How to Disable the Screen Saver ProgrammaticallyLast reviewed: September 29, 1995Article ID: Q126627 |
The information in this article applies to:
SUMMARYUnder 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 ); MORE INFORMATIONWhen the screen saver is activated by the system, it is run on a desktop other than the user's desktop (similar to the login desktop displayed when no one is logged in). Therefore, you cannot use FindWindow() to determine if the screen saver is currently active. Here are two methods that you can use to detect if the screen saver is currently running:
|
Additional reference words: 3.50
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |