Reputation:
I'm doing an app for windows written in C#
.
I want the app to change the icon of the trash icon / recycle bin.
How can I accomplish this?
Upvotes: 2
Views: 782
Reputation: 742
See there in regedit also:
[HKEY_CLASSES_ROOT\CLSID\{645FF040-5081-101B-9F08-00AA002F954E}]
Upvotes: 0
Reputation: 66389
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.
Upvotes: 3