|
-
Dec 16th, 2007, 01:03 PM
#1
Thread Starter
Lively Member
[2.0] Reset Desktop Wallpaper?
Hello!
I am currently working on a "wallpaper changer". I am trying to add a feature that'll let you reset the wallpaper
to its original state after closing the application if a checkBox has is checked or not.
My current problem is that if the default background is not an image, but a selected colour instead, my code will not work properly. I haven't figured out when it works and when it doesn't. Sometimes it just does, and others it doesn't.
I have tried to read the registry key of "Wallpaper" in current_user at "Control Panel\Desktop" and then assign the value to a string which will be assigned to the "OriginalImage" at startup.
When the program ends, it should check whether the checkBox is checked or not, if it is, then it should reset the key "Wallpaper" to it's original value (taken from "OriginalImage") and then call SystemParametersInfo() to update the desktop with the old wallpaper...
Anyway, here is my code if anyone feel like taking a look at it:
frmMain.cs: http://monoport.com/5884
frmMain.Designer.cs: http://monoport.com/5886
WallpaperChangerEngine.cs: http://monoport.com/5885
(Could use more comments and it's a bit of.. unproper code usage as well, I guess)
Thank you!
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
|