Wallpaper Registry

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
 
T

Torgeir Bakken (MVP)

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
 
T

Torgeir Bakken (MVP)

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
 
M

Mark V

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/
 
M

Mark V

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/
 
J

John Wood

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", _
 
J

John Wood

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", _
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top