ur code looks very hard and pro. i just started in couple weeks, my teacher didnt teach much. we have to read books. i dont want my teacher to ask me "did you code this?" if you can, i hope theres way to add something to my own code to make it work?
btw, the files is in a flash drive, im gonna put it in different computers. so i had coded in a way that it reads the text file directly from the "Debug" folder in side the "bin".
thank you.
edit:
i just solved 2 of my problems, but i still dont understand how to show results at all. this is wut i had originally.
then i tried to put "RadioButtonTwo()" under the radio button too, but when i go to second question problem it show result of the second problem on both labels like this:
correct answer to #1 is c, and i click c, then i have this in label1 and label2.
#1 [Correct]
#2 [Label2]
then if i go to second problem, i click on an incorrect answer lets say A, then i will get this.
#1 [Incorrect] << it changed when i get to problem 2, this follows the result of the second problem.
#2 [Incorrect]
or maybe i could use IF statement? how can i improve this?
Code:
Private Sub RadioButtonOne()
If radOne.Checked = True And Answer(passagequestion) = "1" Then
lblOne.Text = ("Correct")
ElseIf radTwo.Checked = True And Answer(passagequestion) = "2" Then
lblOne.Text = ("Correct")
ElseIf radThree.Checked = True And Answer(passagequestion) = "3" Then
lblOne.Text = ("Correct")
ElseIf radFour.Checked = True And Answer(passagequestion) = "4" Then
lblOne.Text = ("Correct")
ElseIf radFive.Checked = True And Answer(passagequestion) = "5" Then
lblOne.Text = ("Correct")
Else
lblOne.Text = ("Incorrect")
End If
End Sub
Private Sub RadioButtonTwo()
If radTwo.Checked = True And Answer(passagequestion) = "1" Then
lblTwo.Text = ("Correct")
ElseIf radTwo.Checked = True And Answer(passagequestion) = "2" Then
lblTwo.Text = ("Correct")
ElseIf radThree.Checked = True And Answer(passagequestion) = "3" Then
lblTwo.Text = ("Correct")
ElseIf radFour.Checked = True And Answer(passagequestion) = "4" Then
lblTwo.Text = ("Correct")
ElseIf radFive.Checked = True And Answer(passagequestion) = "5" Then
lblTwo.Text = ("Correct")
Else
lblTwo.Text = ("Incorrect")
End If
End Sub
Private Sub radOne_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles radOne.CheckedChanged
RadioButtonOne()
'RadioButtonTwo()
End Sub
Private Sub radTwo_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles radTwo.CheckedChanged
RadioButtonOne()
End Sub
Private Sub radThree_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles radThree.CheckedChanged
RadioButtonOne()
End Sub
Private Sub radFour_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles radFour.CheckedChanged
RadioButtonOne()
End Sub
Private Sub RadioFive_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles radFive.CheckedChanged
RadioButtonOne()
End Sub
End Class