Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How does one detect when the wallpaper has changed (Windows XP or greater)?

I have figured out how to change the desktop wallpaper (there are dozens of examples on the Internet.)

One thing that still eludes me: how do I detect when the wallpaper has changed? (Say via the Display control panel or another program changing it.)

like image 806
Boogaloo Avatar asked Jan 06 '10 16:01

Boogaloo


People also ask

How do you change wallpaper when it's restricted?

Under Local Computer Policy, expand User Configuration, expand Administrative Templates, expand Desktop, and then click Active Desktop. Double-click Active Desktop Wallpaper. On the Setting tab, click Enabled, type the path to the desktop wallpaper that you want to use, and then click OK.

How do I change my wallpaper without activating Windows?

To set a different wallpaper on Windows 11 without activation, use these steps: Open Photos. Open the image to set it on the desktop. Right-click the image, select the Set as, and choose the Background option.


1 Answers

Add a message handler for WM_SETTINGCHANGE, SystemEvents.UserPreferenceChanged in .NET. Check if the wallpaper is still the same.

like image 135
Hans Passant Avatar answered Sep 28 '22 00:09

Hans Passant