Wallpaper Registry

  • Thread starter Thread starter John Wood
  • Start date Start date
J

John Wood

I have an application that can switch the connection between two databases.
In order to remind the users what database they are connected to, I would
like to set up the desktop background differently when they connected to
different database.

How can I set up the registry to show different bmp file dynamically ? I
have set the HKCU\ControlPanel\Desktop\Wallpaper to the dmp file I want with
regedit, but it doesn't refresh screen to show the new background. I have
to go into Display property to activate it.

Is there any way I can ask the window to refresh the display to show the new
background ?

Thanks.

JW
 
John said:
How can I set up the registry to show different bmp file dynamically ? I
have set the HKCU\ControlPanel\Desktop\Wallpaper to the dmp file I want with
regedit, but it doesn't refresh screen to show the new background. I have
to go into Display property to activate it.

Is there any way I can ask the window to refresh the display to show the new
background ?

Hi

This command line should do the job:

%windir%\System32\RUNDLL32.EXE user32.dll,UpdatePerUserSystemParameters


With a VBScript:

Set oShell = CreateObject("WScript.Shell")
oShell.Run _
"%windir%\System32\RUNDLL32.EXE user32.dll,UpdatePerUserSystemParameters", _
1, True
 
John said:
How can I set up the registry to show different bmp file dynamically ? I
have set the HKCU\ControlPanel\Desktop\Wallpaper to the dmp file I want with
regedit, but it doesn't refresh screen to show the new background. I have
to go into Display property to activate it.

Is there any way I can ask the window to refresh the display to show the new
background ?

Hi

This command line should do the job:

%windir%\System32\RUNDLL32.EXE user32.dll,UpdatePerUserSystemParameters


With a VBScript:

Set oShell = CreateObject("WScript.Shell")
oShell.Run _
"%windir%\System32\RUNDLL32.EXE user32.dll,UpdatePerUserSystemParameters", _
1, True
 
In said:
Hi

This command line should do the job:

%windir%\System32\RUNDLL32.EXE
user32.dll,UpdatePerUserSystemParameters


With a VBScript:

Set oShell = CreateObject("WScript.Shell")
oShell.Run _
"%windir%\System32\RUNDLL32.EXE
user32.dll,UpdatePerUserSystemParameters", _
1, True

Or OP may want a small 3rd-party utility like
setwallpaper.exe
http://www.optimumx.com/
 
In said:
Hi

This command line should do the job:

%windir%\System32\RUNDLL32.EXE
user32.dll,UpdatePerUserSystemParameters


With a VBScript:

Set oShell = CreateObject("WScript.Shell")
oShell.Run _
"%windir%\System32\RUNDLL32.EXE
user32.dll,UpdatePerUserSystemParameters", _
1, True

Or OP may want a small 3rd-party utility like
setwallpaper.exe
http://www.optimumx.com/
 
Thanks. It works.

Torgeir Bakken (MVP) said:
Hi

This command line should do the job:

%windir%\System32\RUNDLL32.EXE user32.dll,UpdatePerUserSystemParameters


With a VBScript:

Set oShell = CreateObject("WScript.Shell")
oShell.Run _
"%windir%\System32\RUNDLL32.EXE
user32.dll,UpdatePerUserSystemParameters", _
 
Thanks. It works.

Torgeir Bakken (MVP) said:
Hi

This command line should do the job:

%windir%\System32\RUNDLL32.EXE user32.dll,UpdatePerUserSystemParameters


With a VBScript:

Set oShell = CreateObject("WScript.Shell")
oShell.Run _
"%windir%\System32\RUNDLL32.EXE
user32.dll,UpdatePerUserSystemParameters", _
 
Back
Top