|
-
May 29th, 2001, 02:32 PM
#1
changing ...........
how would i make a program that let's you change the screensaver for windows??
--ant
-
May 29th, 2001, 03:00 PM
#2
Re: changing ...........
There is an API function SystemParametersInfo() that can set the screensaver for you.
-Cool Bizs
Good Luck,
-Cool Bizs
-
May 29th, 2001, 03:02 PM
#3
Re: changing ...........
How/where would i put that in my code?
--Ant
-
May 29th, 2001, 03:32 PM
#4
Re: changing ...........
Really sorry, gotta wrong function. SystemParametersInfo() function can only set ENABLE/DISABLE/TIMEOUT VALUE parameters. To change the screensaver itself, you'll need to modify a registry key: HKEY_CURRENT_USER\Control Panel\Desktop\SCRNSAVE.EXE. Set the value of the item to the new screensaver filename (fullpath).
-Cool Bizs
Good Luck,
-Cool Bizs
-
May 29th, 2001, 03:38 PM
#5
Re: changing ...........
So what would i put in the form code? type the code so i can copy it into my project
--Ant
------------------------------------------------------------------------------------------------------------------------
Want Free Software?
E-mail me @: [email protected]
-
May 29th, 2001, 05:29 PM
#6
Re: changing ...........
I don't really have the code handy but I'm sure the explanation from MSDN is suficient for with the logic flow below:
1. Use RegOpenKeyEx() to open HKEY_CURRENT_USER\Control Panel\Desktop
2. Use RegSetValue() to set the SCRNSAVE.EXE value for the opened key above to the new path (ex: c:\winnt\myscrnsave.scr)
3. Use RegCloseKey() to close the opened key from 1.
4. Notify all windows that you've change the system registry by using SendMessageTimeout() function. You need to set the first parameter to HWND_BROADCAST and the second parameter to WM_SETTINGCHANGE (both are constants - need to get the value from MSDN).
-Cool Bizs
Good Luck,
-Cool Bizs
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|