Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Change File Icons in C#

Can you suggest something for changing the files icons in C#? What I means here is that does C# has any class that we can use to change the icons of files. For example, can I replace notepad file icon with doc file icon in c#?

I know we can extract the icon of a file, but I am looking for applying new icon to a file.

let me try to explain it in details. I am working on a windows app that process files. This app creates a special folder and user can create files and folders into this folders. Now when user creates a files, i want to apply custom icon which shows it as under processing. When processing is done, the file icon will be changed to processing complete. I hope this makes sense now.

Thanks

like image 341
Deepak Kumar Avatar asked Dec 31 '25 00:12

Deepak Kumar


1 Answers

You will have to write custom shell extension for this. Which are known as "Icon Overlay Handlers". This is the same way by which applications like TortoiseSVN add icons in explorer.

See this MSDN article and this code example

like image 107
Maheep Avatar answered Jan 02 '26 12:01

Maheep