How to set a desktop wallpaper
-
Can anybody help with a suggestion on how to set a picture as desktop wallpaper using c#? I have begun to do it "the hard way" by starting a picture viewer program and trying to set it from there but this solution is not elegant at all and doesn't satisfy me. :sigh:
-
Can anybody help with a suggestion on how to set a picture as desktop wallpaper using c#? I have begun to do it "the hard way" by starting a picture viewer program and trying to set it from there but this solution is not elegant at all and doesn't satisfy me. :sigh:
-
Can anybody help with a suggestion on how to set a picture as desktop wallpaper using c#? I have begun to do it "the hard way" by starting a picture viewer program and trying to set it from there but this solution is not elegant at all and doesn't satisfy me. :sigh:
Thanks for your reply Martin but I forgot to mention that I have already used that code. At first it works just fine but after a shutdown or restart the wallpaper disappears from desktop but if I go to Properties/Desktop it appears to be there. This is some voodoo thing. :confused:
-
Can anybody help with a suggestion on how to set a picture as desktop wallpaper using c#? I have begun to do it "the hard way" by starting a picture viewer program and trying to set it from there but this solution is not elegant at all and doesn't satisfy me. :sigh:
Did you have a look at this: csharp wallpaperchanger.asp[^]
#region signature my articles #endregion
-
Did you have a look at this: csharp wallpaperchanger.asp[^]
#region signature my articles #endregion
Thanks Giorgi. It works. But the thing that intrigues me is why this code works and the other doesn't. The parts that deal with the actual operation are identical. Probably I am missing something in the part that handles the registry.:):~