I'm doing an app f开发者_如何转开发or windows written in C#
.
I want the app to change the icon of the trash icon / recycle bin.
How can I accomplish this?
The location of the recycle bin icon is defined in the registry of Windows.
This page show exactly where: http://www.winxptutor.com/rbicon.htm
I'll copy it here as mirror just in case:
The Recycle Bin icon is defined in two places in the registry:
HKEY_CLASSES_ROOT\
CLSID\
{645FF040-5081-101B-9F08-00AA002F954E}\
DefaultIconand
HKEY_CURRENT_USER\
Software\
Microsoft\
Windows\
CurrentVersion\
Explorer\
CLSID\
{645FF040-5081-101B-9F08-00AA002F954E}\
DefaultIcon
By default, the values point to system DLL with the default icon. (Different in each Windows version)
So all you need is overwriting the registery values for the names (Default)
, empty
and full
in the above two locations to your own DLL with your own icon and the icon should change.
Writing to regisry with C#
should be simple, if you need further help let us know.
See there in regedit also:
[HKEY_CLASSES_ROOT\CLSID\{645FF040-5081-101B-9F08-00AA002F954E}]
精彩评论