Load image to image list......
I'm throwing together an app real quick and haven't used the imagelist control in a while. I've got my images in my image list control, but I can't remember how to access them.
When an option button is clicked, I need my Image1 control to display a specified image from the imagelist control.
VB Code:
image1.picture = imagelist1.index (1)
I know that's not right, but I can't remember how to specify the index value of the image in the imagelist. Any help is appreciated.
Re: Load image to image list......
If have set Key for each image in your imagelist then use it or use index (it starts with 1) otherwise:
VB Code:
Private Sub Command1_Click()
Image1.Picture = ImageList1.ListImages("addnew").Picture
End Sub
'or
Private Sub Command1_Click()
Image1.Picture = ImageList1.ListImages(1).Picture
End Sub