Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ScreenSaver Enabling/Disabling

Status
Not open for further replies.

BDRichardson

Programmer
Jul 23, 2003
46
GB
Does anyone know if there is a problem with re-enabling the Screen Saver after it has been disabled programmatically.

I am using the SystemParametersInfo function within User32.dll, and have been successful in disabling the Screen Saver, but it does not work for re-enabling. The only way I can re-activate it is to re-apply the settings through the Display properties in the Control Panel.

Sample lines of code, in simplest form:
Code:
// Screen Saver disable
SystemParametersInfo( 17, 0, 0, 0);

// Screen Saver enable
SystemParametersInfo( 17, 1, 0, 0);

I have discovered there may be problems with retrieving the Active status, but have not found any information relating to re-activation.

Your assistance would be much appreciated.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top