Private Sub Form_Load()
Dim i As Integer
' Attach the ImageCombo to the ImageList that
' holds its pictures.
Set ImageCombo1.ImageList = ImageList1
' Create some items.
For i = 1 To ImageList1.ListImages.Count
ImageCombo1.ComboItems.Add , , _
ImageList1.ListImages(i).Key, i
Next i
' Select the first item.
Set ImageCombo1.SelectedItem = ImageCombo1.ComboItems(1)
End Sub
|