Home » Post Item » exer
exer
March 1, 2010Public Class Form1
Private Sub btnplay_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnplay.Click
If txtuser.Text = “” Or txtpass.Text = “” Then
MsgBox(”Please input username or password”)
Else
Me.Hide()
Form2.Show()
Me.Text = “Welcome ” & Me.txtuser.Text & “to what’s the word…”
Form2.lblwel.Text = “Salutation” & Me.txtuser.Text & ” Please click on buton PLAY begin the Game..! Gud luck..!!”
End If
End Sub
Private Sub btnchange_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnchange.Click
txtuser.Text = “ann”
txtpass.Text = “mico”
MsgBox(”Please Enter your New Password or Pass”)
End Sub
Private Sub btnexit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnexit.Click
Me.Close()
End Sub
End Class
Public Class Form2
Private Sub btnplay_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnplay.Click
gbquestion.Visible = True
txtq2.Visible = False
lblans2.Visible = False
txtq3.Visible = False
lblq3.Visible = False
txta2.Visible = False
lblans2.Visible = False
txta3.Visible = False
lblans3.Visible = False
txta1.Visible = True
lblans1.Visible = True
lblq2.Visible = False
btnc2.Visible = False
btnc3.Visible = False
txtq1.Text = “Who had the face that launched a thousand ships?”
End Sub
Private Sub btnc1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnc1.Click
If txta1.Text = “Helen” Then
btnc1.Enabled = True
txta1.Enabled = False
txtq1.Enabled = False
lblq1.Enabled = False
lblans1.Enabled = False
lblans1.Visible = True
lblq2.Visible = True
txtq2.Visible = True
txta2.Visible = True
btnc2.Visible = True
txtq2.Text = “What is the third largest planet in the solar system?.”
Else
MsgBox(”sorry but youre answer is wrong please try again…”)
End If
End Sub
Private Sub btnc2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnc2.Click
If txta2.Text = “Uranus” Then
btnc2.Enabled = True
txta2.Enabled = False
txtq2.Enabled = False
lblq2.Enabled = False
lblans3.Visible = True
txtq3.Visible = True
txta3.Visible = True
btnc3.Visible = True
txtq3.Text = “What Animal is called the king of Jungle?”
Else
MsgBox(”Sorry but youre answer is wrong please try again..!”)
End If
End Sub
Private Sub btnc3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnc3.Click
If txta3.Text = “Lion” Then
btnc3.Enabled = True
txta3.Enabled = False
txtq3.Enabled = False
lblans3.Visible = True
txta3.Visible = True
btnc3.Visible = True
MsgBox(”Congratulation you’ve got the correct answer..”)
Else
txta3.Text = ” “
MsgBox(”Sorry but your answer is wrong please try again”)
End If
End Sub
Private Sub btnagain_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnagain.Click
If txtq1.Text = “Who is your favorite Instructor.” Then
txta1.Text = “Mr.Michael Moises”
txtq2.Text = “who is you best friend!”
txta2.Text = “Ms.Julie Vallega”
txtq3.Text = “why are you studying for what reason?”
txta3.Text = “To Help my family and to financeal Problems”
Else
gbquestion.Visible = False
txta1.Enabled = True
txta2.Enabled = True
txta3.Enabled = True
End If
End Sub
Private Sub btnchange_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnchange.Click
Form1.Show()
txta1.Text = “mic0″
txta2.Text = “anN”
MsgBox(”Please Enter your username or password”)
txta3.enabled = True
txtq1.Enabled = True
End Sub
Private Sub btnexit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnexit.Click
Me.Close()
End Sub
End Class
All comments are moderated. Your comments will not appear here unless approved by the blog owner. Thank you.





