Hi. I'm using VB.net '08 express and I have a form in a program with a picturebox. I have a series of images in My.Resources. What I am trying to do is get the images in the box to change in sequence whenever the button is clicked. So far, code reads;
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim sequence As Integer
Select Case sequence
Case 1
PictureBox1.Image = My.Resources._55
sequence = sequence + 1
Case 2
PictureBox1.Image = My.Resources._56
sequence = sequence + 1
Case 3
PictureBox1.Image = My.Resources._57
sequence = sequence + 1
End Select
End Sub
When the button is clicked, the 1st image appears and the button then does nothing. If anyone has any ideas, I would be grateful.
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim sequence As Integer
Select Case sequence
Case 1
PictureBox1.Image = My.Resources._55
sequence = sequence + 1
Case 2
PictureBox1.Image = My.Resources._56
sequence = sequence + 1
Case 3
PictureBox1.Image = My.Resources._57
sequence = sequence + 1
End Select
End Sub
When the button is clicked, the 1st image appears and the button then does nothing. If anyone has any ideas, I would be grateful.