Im creating a loop quiz in visual basics express edition 2005 but im stuck?
now if your not sure what i mean when i say loop quiz i mean one question pops up at a time and you click the next button to go on the next one, now ive done my questions and answers but i want to put pictures in it like with each question with a different picture, heres my code so far
Public Class quiz
Dim count, score As Integer
Dim question(10) As String
Dim answer(10) As String
Private Sub quiz_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
question(1) = "2 + 2?"
answer(1) = "4"
question(2) = "4 + 4"
answer(2) = "8"
question(3) = "8 + 8?"
answer(3) = "16"
question(4) = "2 x 2"
answer(4) = "4"
question(5) = "4 x 5"
answer(5) = "20"
question(6) = "5 x 5"
answer(6) = "25"
question(7) = " 2 x 4"
answer(7) = "8"
question(8) = " 3 x 2"
answer(8) = "6"
question(9) = " 4 x 3"
answer(9) = "12"
question(10) = " 3 x 3"
answer(10) = "9"
count = 1
score = 0
Label1.Text = question(1)
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
If TextBox1.Text = answer(count) Then score = score + 1
count = count + 1
If count > 10 Then
MsgBox("score is " & score.ToString)
End
End If
Label1.Text = question(count)
TextBox1.Text = String.Empty
End Sub
now this is one of my old quizes i was doing for college as part of my course, i can add a picture tool to my form but i dont want the same picture to show up, how can i add different ones
|