Using the images
Once you have added the images, you will want a control to use them! To do
this, select the control you want to use the images (this has to be another
Common Control, ie TreeView, ListView,
Toolbar etc), and show the Property Pages (right click and select properties).
Find the ImageList drop down box, and choose the ImageList you want to use. If
you are using the ListView control, then click the
ImageLists tab, and select the ImageList from one of the drop downs (you can use
different image lists for the large icons, small icons and column
headers).
Now, for the Toolbar, simply go to the button you want in the Property Pages,
and set its Image property to the Key of the Image you want:
If you want to use an ImageList on another form, you have to set the Image
List and Image properties at Runtime. Below is some example code:
Set Toolbar1.ImageList = frmOther.imlIcons
With Toolbar1
.Buttons("Curve").Image = "Curve"
.Buttons("Save").Image = "Save"
End With
This code sets Toolbar1's image list to the imlIcons ImageList on frmOther.
It then sets the Images to use for the buttons Curve, and Save.