Static Dim imgNum As Integer = 1
imgNum += 1
If imgNum > 5 Then imgNum = 1
Select Case imgNum
Case 1
PictureBox2.Image = My.Resources.pic1
Case 2
PictureBox2.Image = My.Resources.pic2
Case 3
PictureBox2.Image = My.Resources.pic3
Case 4
PictureBox2.Image = My.Resources.pic4
Case 5
PictureBox2.Image = My.Resources.pic5
End Select
as you can see, that code just can hold defined number of image (5 image or more or less) and can't hold unpredict number of image.
thanks for your help.

New Topic/Question
Reply



MultiQuote



|