Computing.Net > Forums > Programming > Force Windows to redraw desktop

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Force Windows to redraw desktop

Reply to Message Icon

Name: radon
Date: September 6, 2002 at 13:37:39 Pacific
OS: any
CPU/Ram: any
Comment:

How can I get windows to redraw the desktop wallpaper, so if I change it via the registry, then changes take effect right away using Visual C++ 6.0 or Visual Basic?

Thanks



Sponsored Link
Ads by Google

Response Number 1
Name: Birdman
Date: September 6, 2002 at 13:41:18 Pacific
Reply:

Well, I can't help you, but I saw some posts on http://www.gamedev.net/community/forums/forum.asp?forum_id=21

about that kind of thing. Maybe you can find it there.


0

Response Number 2
Name: setagllib@errokey
Date: September 9, 2002 at 03:59:06 Pacific
Reply:

I'm not certain if the Windows desktop checks if its displayed desktop is that of the registry with each redraw, but in C you could try the following:

UpdateWindow(GetDesktopWindow());

But this is only a guess - it will attempt to redraw the desktop window handle and, if Windows is anything of a good operating system, it would refresh the wallpaper too.

Visual Basic most certainly has some repulsive, moronic function to do this in one call, but (knowing VB), it is safe to assume that the function will find some new creative way to occupy 15 megabytes of memory and take 3 seconds to get the job done. You have been warned.


0

Response Number 3
Name: borelli33
Date: September 9, 2002 at 17:35:58 Pacific
Reply:

I do alot of registry programming and have found the easiest way to be the following:

Go into the task manager (ctl)+(alt)+(del) ONLY ONCE and then highlight explore.exe with the mouse and click end task. You may have to do this more than once for it to actually end explorer and if windows comes up with the wait dialog box just click cancel.

What this does is unloads explorer from memory and causes windows to reload it as if it were loading explore.exe at startup with the new registry settings and all. I hope this helps!

borelli33@netzero.net


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Programming Forum Home


Sponsored links

Ads by Google


Results for: Force Windows to redraw desktop

JAVA- adding window to a container ERROR www.computing.net/answers/programming/java-adding-window-to-a-container-error/2643.html

Making WinXP load directly into RAM www.computing.net/answers/programming/making-winxp-load-directly-into-ram/8357.html

DLL's and Viruses www.computing.net/answers/programming/dlls-and-viruses/10777.html