views:

212

answers:

3

Hi, I would like to use standard icons in treeview but I am not sure where to get them? I tried different places like resources etc., but without luck. thank you

A: 

In Windows 7 they are held as resources in C:\Windows\system32\imageres.dll

I think older versions of windows had the resources in user32.dll

vanja.
A: 

They are stored as resources in %SystemRoot%\system32\SHELL32.dll.

Here's a tutorial in how to extract the icons in c#.

Also look at this question: http://stackoverflow.com/questions/949196/loading-icons-from-shell32-dll-win32-handle-is-not-valid-or-is-the-wrong-type

Mark Pim
+1  A: 

If you're using the treeview to show folders/drives/files then your best bet would be to work with the system image list/SHGetFileInfo. This way you get "native" images on all Windows versions.

liggett78