How do I change my Windows desktop wallpaper programmatically?
问题 I'd wish to set a wallpaper for Windows XP using C#. I've developed the code so it perfectly works in Windows 7, but apparently it's not the same for XP. I add that wallpaper as a resource, set its compile action as Content and Always copy. It, curiously, sets the correct Wallpaper name inside the Desktop's properties dialog. However, the wallpaper is not set. My code looks like this: public sealed class Wallpaper { Wallpaper() { } const int SPI_SETDESKWALLPAPER = 20; const int SPIF