Articles   Members Online:
-Article/Tip Search
-News Group Search over 21 Million news group articles.
-Delphi/Pascal
-CBuilder/C++
-C#Builder/C#
-JBuilder/Java
-Kylix
Member Area
-Home
-Account Center
-Top 10 NEW!!
-Submit Article/Tip
-Forums Upgraded!!
-My Articles
-Edit Information
-Login/Logout
-Become a Member
-Why sign up!
-Newsletter
-Chat Online!
-Indexes NEW!!
Employment
-Build your resume
-Find a job
-Post a job
-Resume Search
Contacts
-Contacts
-Feedbacks
-Link to us
-Privacy/Disclaimer
Embarcadero
Visit Embarcadero
Embarcadero Community
JEDI
Links
How to refresh the Windows Desktop Turn on/off line numbers in source code. Switch to Orginial background IDE or DSP color Comment or reply to this aritlce/tip for discussion. Bookmark this article to my favorite article(s). Print this article
Refresh the Windows Desktop 02-Oct-02
Category
System
Language
Delphi 2.x
Views
100
User Rating
No Votes
# Votes
0
Replies
0
Publisher:
DSP, Administrator
Reference URL:
DKB
			Author: Mike Shkolnik 

How can I refresh the Windows desktop after I have set a new background image in 
the registry?

Answer:

Solve 1:

I want to post this article because I sure that this question can ask a lot of 
developers but to find an answer is not easy task. 

So if you need refresh a desktop in run-time, you can execute a next procedure: 

1   uses ShlObj;
2   {...}
3   SHChangeNotify(SHCNE_ASSOCCHANGED, SHCNF_IDLIST, NULL, NULL);

This code will refresh a desktop image and re-read the icons for files with 
registered extentions. 

PS: you can do a same if you press a right mouse button on desktop and select 
Update item. 

Solve 2:

4   procedure TForm1.Button1Click(Sender: TObject);
5   begin
6     SendMessage(FindWindow('Progman', 'Program Manager'), WM_COMMAND, 106597, 0);
7   end;


This has the same effect as pressing F5 in Explorer.

			
Vote: How useful do you find this Article/Tip?
Bad Excellent
1 2 3 4 5 6 7 8 9 10

 

Advertisement
Share this page
Advertisement
Download from Google

Copyright © Mendozi Enterprises LLC