RobertoFreemano
asked on
For Loop on imageList (picturebox) - vb.net
Hi Experts,
I have a winform with a Button, picturebox and imagelist. The imagelist only has 3 images embedded.
I simply want to click button1 and it shows image0, then if clicked again, image1, then if clicked again.. image 2... then loop if clicked.
Help!
I have a winform with a Button, picturebox and imagelist. The imagelist only has 3 images embedded.
I simply want to click button1 and it shows image0, then if clicked again, image1, then if clicked again.. image 2... then loop if clicked.
Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles Button1.Click
Dim i As Integer
For i = 0 To 2
PictureBox1.Image = ImageList1.Images(i)
i = i + 1
Next
End Sub
My code only shows image0...Help!
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER