The "ImageList must be initialized before it can be used" VB 6.0 error
Posted on 2004-04-11
I have a VB 6.0 problem. Let's go through step by step:
1. I add Microsoft Windows Common controls 6.0(SP4)
2. I add these 3 components on the form:
imageCombo1 representing ImageCombo control
imageList1 representing ImageList control
command1 representig a CommadnButton.
Let's look at the code:
Private Sub Command1_Click()
ImageList1.ListImages.Add 1, "ImageKey", LoadPicture("c:\test.bmp")
ImageCombo1.ComboItems.Add 1, "ItemKey", "This is a test item", "ImageKey"
Now when pressing the command button I get this error : "ImageList must be initialized before it can be used"
Thanks for all your help.