Unit 7 Mobile App-Devlopment Lesson 2
Unit 7 Mobile App-Devlopment Lesson 2
APPS DEVELOPMENT
Mr. K Douglas
Learning Aim
score = 0
Label1.Text = newquestion Score after each
End Sub question.
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button3.Click
If CboAnswer.Text = Answer(newquestion) Then
'If TxtAnswer.Text = Answer(newquestion) Then
MsgBox("Well done")
score = score + 1
Checking if answers
are correct or not
Else
MsgBox("incorrect")
End If
newquestion += 1 (Next question number)
Lblscore.Text = score ( Showing the score)
TxtAnswer.Enabled = False
Button3.Enabled = False Disabling buttons
CboAnswer.Enabled = False
If newquestion > 3 Then
MsgBox("your score is" & " " & score)
TxtAnswer.Enabled = False
Button3.Enabled = False
CboAnswer.Enabled = False Showing the final
Button2.Enabled = False score
Button1.Visible = True
End If
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button2.Click
Label1.Text = newquestion Displaying questions
number
LblQuestion.Text = question(newquestion)
LblChoice1.Text = choice(newquestion, 1)
LblChoice2.Text = choice(newquestion, 2) Displaying questions
LblChoice3.Text = choice(newquestion, 3) from the array (2D
LblChoice4.Text = choice(newquestion, 4) Array)
TxtAnswer.Enabled = True
Button3.Enabled = True
CboAnswer.Enabled = True Enabling all the
End Sub buttons
Private Sub Button1_Click(ByVal sender As
System.Object, ByVal e As System.EventArgs)
Handles Button1.Click
Me.Hide()
Form1.Show()
End Sub
End Class