rossryan
asked on
Folder icons
Anyone know a quick way to grab folder icons?
What do you mean "grab folder icons"?
ASKER
Hmm. Load it into memory, modify it...
Example (for file icons):
//Image for the file.
private void setImage(string fileName)
{
Bitmap b;
FileIcon f = new FileIcon(
fileName,
FileIcon.SHGetFileInfoCons tants.SHGF I_LARGEICO N |
FileIcon.SHGetFileInfoCons tants.SHGF I_ICON);
b = f.ShellIcon.ToBitmap();
_image = b;
}
Example (for file icons):
//Image for the file.
private void setImage(string fileName)
{
Bitmap b;
FileIcon f = new FileIcon(
fileName,
FileIcon.SHGetFileInfoCons
FileIcon.SHGetFileInfoCons
b = f.ShellIcon.ToBitmap();
_image = b;
}
Have you tried the same with a path to a folder instead to a file?
ASKER
Hmm. The Class (not mine) I am using for Icon Extraction says this:
/// Enables extraction of icons for any file type from
/// the Shell.
But I am willing to give it a try...
/// Enables extraction of icons for any file type from
/// the Shell.
But I am willing to give it a try...
ASKER
Crashed.
ASKER
I cannot think of the icons as being stored in the path...perhaps the registry?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Right. I'll give it a shot.