IDesktopWallpaper::SetWallpaper is suitable for setting the desktop wallpaper. A related question with code resources.
How do I set different backgrounds to different monitors using C# or VB.net?
I have a 3 monitor setup, and each monitor is a different size and resolution. I want to write a program in C# or VB.Net that will let me setup a slideshow style desktop background change, setting a different directory full of images for each monitor. The problem is that all I know is how to change the desktop background image for all three at once (using the SystemParametersInfo API call), but it doesn't let you assign different images - all monitors get the same image. I just need to know whatever call it is tell it to put X image on monitor number Y.
I also tried to do this through the registry, but I cant find a key that assigns an image to a specific monitor. It just has a single directory listing for its slideshow function (Computer\HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Wallpapers\SlideshowDirectoryPath1), written as a non-standard PIDL rather than a cleartext string. Not a help for multi-monitor systems.
Windows development | Windows API - Win32
-
Xiaopo Yang - MSFT 12,731 Reputation points Microsoft External Staff
2022-03-04T05:22:41.667+00:00