Hi there,
I am new here, and i humbly seek your assistance, when i try to increment the for loop it jumps to case 5 of the select case statement. What i actually want is when i press the Next button it shows me a set of options which is case 2, but now it straight away jumps to case 5.
Please help me.
Private Sub btnNext_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnNext.Click
Dim counter1 As Byte = 1
For counter1 = 1 To 5
Select Case counter1
Case 1
lblQuestion.Text = "What is the country of this flag?"
GroupBox1.Text = "Question 1 of 5"
RadioButton1.Text = "Singapore"
RadioButton2.Text = "Malaysia"
RadioButton3.Text = "Indonesia"
RadioButton4.Text = "China"
picQuiz.Image = Image.FromFile("singaporeflag.gif")
picQuiz.SizeMode = PictureBoxSizeMode.StretchImage
Case 2
lblQuestion.Text = "What is the country of this flag?"
GroupBox1.Text = "Question 2 of 5"
RadioButton1.Text = "Singapore"
RadioButton2.Text = "Malaysia"
RadioButton3.Text = "Indonesia"
RadioButton4.Text = "China"
picQuiz.Image = Image.FromFile("china-flag.gif")
picQuiz.SizeMode = PictureBoxSizeMode.StretchImage
Case 3
lblQuestion.Text = "What is the country of this flag?"
GroupBox1.Text = "Question 3 of 5"
RadioButton1.Text = "Singapore"
RadioButton2.Text = "Malaysia"
RadioButton3.Text = "Indonesia"
RadioButton4.Text = "China"
picQuiz.Image = Image.FromFile("id-lgflag.gif")
picQuiz.SizeMode = PictureBoxSizeMode.StretchImage
Case 4
lblQuestion.Text = "What is the country of this flag?"
GroupBox1.Text = "Question 4 of 5"
RadioButton1.Text = "Singapore"
RadioButton2.Text = "Malaysia"
RadioButton3.Text = "Indonesia"
RadioButton4.Text = "China"
picQuiz.Image = Image.FromFile("malaysia-flag.jpg")
picQuiz.SizeMode = PictureBoxSizeMode.StretchImage
Case 5
lblQuestion.Text = "What is the country of this flag?"
GroupBox1.Text = "Question 5 of 5"
RadioButton1.Text = "Singapore"
RadioButton2.Text = "Malaysia"
RadioButton3.Text = "Indonesia"
RadioButton4.Text = "China"
picQuiz.Image = Image.FromFile("united-states-flag.gif")
picQuiz.SizeMode = PictureBoxSizeMode.StretchImage
End Select
counter1 += 1
Next
'Next counter1
End Sub
End Class