Click here to Skip to main content
15,887,971 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I wonder if there is a way in .net to temporarily change icon of a folder/file to something different than regular file/folder icon. I am creating an application that reqires to monitor activities inside folder/file, this can be achieved by FileSystemWatcher but my requirement is to change the icon of the files/folder with a Tick Mark when it is monitored. I wonder if there is a way to temporarily change the icon to green tick mark in addition to the default windows icon , I do not need to change the file display icons in windows registry for all such file types.
Posted
Comments
Sergey Alexandrovich Kryukov 9-Jun-11 11:23am    
What is that? Tag it! ASP.NET, WPF, Forms, what?! Do not force experts to give answers for all possible cases. You hardly will get any reasonable answer unless you tag it properly. Use "Improve question" now.
--SA

1 solution

You'll have to write a "Shell Extension", specifically an "Overlay Icon". How is described here[^]. If you want to do it from C#, you'll also need the P/Invoke[^] signature.
 
Share this answer
 
Comments
San4Ramyam 10-Jun-11 3:48am    
Thanks a lot for the perfect answer. I also found some leads in code project after you directed me to IShellIconOverlayIdentifier.
Eddy Vluggen 10-Jun-11 4:56am    
Thanks, and you're welcome. Would love to see an article on your implementation, if you can spare the time :)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900