How do I set different backgrounds to different monitors using C# or VB.net?

Michael Jansen 21 Reputation points
2022-03-04T02:53:16.287+00:00

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
{count} votes

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.