I am writing a VB 6.0 program similar to Windows Explorer, which has a tree
view and a list view to select directories and files. I would like to
associate an icon with each file, according to the standard file extension,
or use application file's own icon, just like the Explorer does.
It is quite easy to place a icon using the ImageList control, together with
the "TreeView.Nodes.Add" and "ListItem.SmallIcon" methods. The question is,
how do these get into the ImageList in the first place? Since there are
dozens of standard file types and icons, can I get a list from the system at
run time? How do we extract the icon associated with an application? Do I
need a huge Select Case to choose the correct image key? There must be an
easier way!
Thanks and regards,
Garet