How to change an icon for one single file of the specific type?

ぃ、小莉子 提交于 2019-12-30 04:32:10

问题


I know how to change an icon for a whole file type using registry and file type association. I also know how to change an icon for a separate folder using desktop.ini file.

My questions is whether it is possible to change an icon for one specific file, let's say one.doc file?

I cannot find a way doing it, yet some upload programs seem to be able to change an icon of the currently uploaded file, while all other files of this type stay with the standard icon. How do they do it?

I can accept a solution in any language; VB, C++, C# - anything goes, though C# is preferable. Thanks


回答1:


You can use an IconHandler to allow icons to be customized on a file-by-file basis. Note that shell extensions should not be written in managed code, so C++ is the language of choice here.

Note also that it's highly unusual to be installing an icon handler for another application's file type.



来源:https://stackoverflow.com/questions/9046903/how-to-change-an-icon-for-one-single-file-of-the-specific-type

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!