Download the IconEx Utility and Source code (97kb) Download the VB6 IconEx Utility and Source code (97kb)
  |
Before you Begin
|
  |
  |
|
This project requires the SSubTmr.DLL component. Make sure you have loaded and registered this before trying the project.
|
  |
This application uses the cFileIcon class I developed to
read and write .ICO files and resources to allow you to extract real icons with multiple sizes
and colour depths from executables.
The application can load icons either from 32bit executables (.EXE, .DLL, .OCX etc) or from
.ICO files. When you select an icon, the different sizes and colour depths available in the
resource are displayed in the right-hand side list. You can then save all the different
sizes out, or you can select one or more individual resource types and
save that. The application creates real .ICO files which you can then use to load into a
VB ImageList or the vbAccelerator ImageList control and class.
As well as demonstrating the class, it also demonstrates the following in VB:
- Enumerating Resources contained within an executable file using the API
EnumResources callback function.
- Creating a new list box-style control in VB code (this is the control on the
right hand side of the application in the picture above). This control is starting
point for any single column list control you might want to develop yourself and demonstrates
using the Scroll Bar Class.
This code is the basis for a forthcoming Icon Editor package in VB which will use the
DIBSection class.
Some examples of icons found whilst playing with this code:
Resource ID 307 in MSAccess.exe (Access 97). MS Access' Programmers were clearly hoping to win my "Worst Icons Ever Seen" competition
with this one!
This icon from COMDLG32.DLL has the unusual size of 98x30 but still works just fine in my
class (try and get the VB StdPicture object to do that!). It is a good example of how useful
icons can be when creating pictures on forms.
Back to top
Back to Resources
|