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!

change screen saver?? 1

Status
Not open for further replies.

Gert

Programmer
Apr 9, 2000
240
DO
Hi, all
could be some API call that let me change the screen saver from VFP?

thanksssssssss in advance
 
You'll need to use the registry...

In the registry under [HKEY_CURRENT_USER\Control Panel\Desktop]

You will find some values such as:

ScreenSaverIsSecure=1
ScreenSaveTimeOut=900
ScreenSaveActive=1
SCRNSAVE.EXE=C:\WINDOWS\System32\SSFLWBOX.SCR

...now lets look at each of them and what they do...

ScreenSaverIsSecure is whether the screensaver should be password protected on resume. 1 = YES 0 = NO

ScreenSaveTimeOut is how many seconds of inactivity should trigger the screen saver. 900 = 15 minutes

ScreenSaveActive is whether the screen saver is enabled. 1 = YES 0 = NO

SCRNSAVE.EXE holds the fullpath to the screen saver (scr) file that is to be run. It is important to note that in Windows 95 and 98 this value is not held in the registry but rather is held in the SYSTEM.INI, this was changed by Microsoft when windows NT came out. Also, this value is removed from the registry if the screen saver is not activated...so if screen saver was NONE then it wouldn't show up in the registry.

So, in order to do what you want you will need to write to the registry. There are plenty of FAQs and threads on it here if you are not sure where to start...I personally use the registry.vcx that comes with VFP to handle editing the registry.


Slighthaze = NULL
craig1442@mchsi.com
"Whom computers would destroy, they must first drive mad." - Anon​
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top