问题描述
桌面上的某些图标,例如我的电脑",控制面板",与其他图标没有什么不同.因此,我想将这种图标添加到桌面.我该如何实施?
另外,可以动态更改这种图标吗?例如当网络连接禁用时,该图标应更改为禁用状态. :)
Hi,
Some icons on the desktop such as "My computer", "Control Panel", are no different from others. So I want to add this kind of icon to the desktop. How can I implement this?
Also, can this kind of icon can be changed dynamically? e.g. when network connection disabled, the icon shall be changed to the disabled status. :)
推荐答案
HKEY_CLASSES_ROOT\CLSID
\{D46C1FE2-7F18-41D0-6250-848C1D003400}
(default) = "My test icon"
InfoTip = "My info tip"
\DefaultIcon
(default) = "C:\MyIcon.ico"
\Shell
\Open
\Command
(default) = "C:\windows\notepad.exe"
此时,外壳图标已准备就绪,必须将其添加到可以看到它的地方.
转到HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Desktop
并添加键NameSpace
.它可能已经存在.
在NameSpace
下,创建一个名为{D46C1FE2-7F18-41D0-6250-848C1D003400}
的密钥.
如果希望在我的电脑"窗口中而不是在桌面上创建图标,则可以在HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace
中进行相同的操作.
如果要根据网络连接来更改外壳图标,则必须编写一个程序来监视连接并在Windows寄存器中相应地调整外壳图标,例如通过从NameSpace中将其删除.
At this point, the shell icon is ready and will have to be added to a place where you can see it.
Go to HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Desktop
and add a key NameSpace
. It may already exist.
Under NameSpace
, create a key named {D46C1FE2-7F18-41D0-6250-848C1D003400}
.
If you wish to create the icon in the My Computer window rather than on the desktop, you could do the same in HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace
.
If you want to change the shell icon depending on net connection, you''ll have to write a program that monitors the connection and adjusts the shell icon accordingly in the windows register, for example by removing it from the NameSpace.
这篇关于如何将外壳图标添加到桌面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!