WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

Display

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

How to Refresh Desktop Wallpaper without rebooting

Keywords:     wallpaper refresh

Question:

I'm trying to change the Desktop background on the fly, when someone logs into the network. the problem is that I must either reboot the machine or shut down and log in as a different user in order for the changes to take affect. Is there any way to refresh the screen without have to do any of the above.

I have done the following.

        regkey1 = RegOpenKey(@REGCURRENT,"Control Panel\Desktop")
        regsetvalue(regkey1,"[Wallpaper]", "c:\windows\down.bmp" )
        regCloseKey(regkey1)
Any help that you can provide would be helpful.

Answer:

Use the WinBatch WallPaper function...
        DirChange("c:\windows")
        a = "c:\windows\down.bmp"
        tile = @FALSE
        If FileSize(a) < 40000 Then tile = @TRUE
        Wallpaper(a, tile)

Question on Finding a User's Background Image:

How do i find a user's background image?

I know it's in that darn registy somewhere. I want to do a type of background slide show while WinBatch continues to process commands, then I want to revert back to the old background when done.

Answer:

Here you go:
	bmp=WinParamGet(10)
	tiled=IniRead("Desktop","TileWallPaper",0)
	Message(tiled,bmp)
Then use WallPaper to change wallpaper.

Be forewarned that MS PlusPack give you an ability to "stretch" wallpaper to fit the screen background.

If you tile the wallpaper it has no effect. If you don't tile it, and the option is in effect then the bmpfile is mooshed to fit the screen. I just ignore it. It might be the WallPaperStyle in the win.ini file but I'm not sure.


Article ID:   W13210
Filename:   Change the Wallpaper.txt
File Created: 1999:04:15:16:52:30
Last Updated: 1999:04:15:16:52:30