需要更改文件的默认图标 [英] Need to change the default icon of an file

查看:83
本文介绍了需要更改文件的默认图标的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我需要更改文件的默认图标.如何通过编程实现它?

I need to change the default icon of the file. How can i achieve it proggrammatically?

此致

Amal Raj U

Amal Raj U

推荐答案

这取决于文件的类型.文件显示的默认图标取决于文件类型.对于大多数文件类型,所使用的图标由与其关联的默认应用程序确定.因此,例如,如果默认应用程序是Word,则 该文件将显示Word图标.要更改整个文件类别的图标,您需要更新注册表的HKCR或HKCU树中的相应条目.你会发现很多 有关如何在线执行此操作的示例.

It depends on what type of file it is. The default icon shown for a file is based upon the file type. For most file types the icon used is determined by the default application associated with it. So, for example, if the default application is Word then the file will show the Word icon. To change the icon for an entire class of files you'd need to update the appropriate entry in the HKCR or HKCU tree of the registry. You can find plenty of examples of how to do this online.

对于程序,默认图标是EXE本身包含的第一个图标.要进行更改,您只需要按正确的顺序添加一个新图标即可.

For a program the default icon is the first icon contained within the EXE itself. To change that you need only add a new icon in the correct order.

快捷方式将对要链接的文件使用默认图标.您可以使用属性"对话框更改它.对于快捷方式,您必须更新快捷方式文件.快捷方式文件只是一个文本文件,因此您可以生成新的文件.这是一个

Shortcuts will use the default icon for the file being linked. You can change that using the Properties dialog. For shortcuts you have to update the shortcut file. A shortcut file is simply a text file so you can generate the new one. Here's an example in Powershell.

迈克尔·泰勒
http://www.michaeltaylorp3.net

Michael Taylor
http://www.michaeltaylorp3.net


这篇关于需要更改文件的默认图标的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆