Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Public Class Form1
- Dim xmatriz(2, 3) As Integer
- Private Sub Label1_Click(sender As Object, e As EventArgs) Handles Label1.Click
- End Sub
- Private Sub GroupBox4_Enter(sender As Object, e As EventArgs) Handles GroupBox4.Enter
- End Sub
- Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
- GroupBox2.Visible = True
- End Sub
- Private Sub Button4_Click(sender As Object, e As EventArgs) Handles Button4.Click
- GroupBox2.Visible = False
- GroupBox1.Visible = True
- RadioButton4.Checked = False
- RadioButton5.Checked = False
- RadioButton6.Checked = False
- End Sub
- Private Sub Button3_Click(sender As Object, e As EventArgs) Handles Button3.Click
- GroupBox3.Visible = False
- GroupBox2.Visible = True
- RadioButton7.Checked = False
- RadioButton8.Checked = False
- RadioButton9.Checked = False
- Button5.Visible = False
- PictureBox5.Visible = False
- End Sub
- Private Sub Button6_Click(sender As Object, e As EventArgs) Handles Button6.Click
- End
- End Sub
- Private Sub Button5_Click(sender As Object, e As EventArgs) Handles Button5.Click
- Dim i, xcorrectas As Integer
- xcorrectas = 0
- For i = 1 To 3
- If xmatriz(1, i) = xmatriz(2, i) Then
- xcorrectas = xcorrectas + 1
- End If
- Next i
- MsgBox("Acertou" & Str(xcorrectas) & " perguntas.", 64, "Resultado")
- GroupBox1.Visible = False
- GroupBox2.Visible = False
- GroupBox3.Visible = False
- End Sub
- Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
- GroupBox3.Visible = True
- End Sub
- Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
- xmatriz(1, 1) = 3
- xmatriz(1, 2) = 1
- xmatriz(1, 3) = 2
- xmatriz(2, 1) = 0
- xmatriz(2, 2) = 0
- xmatriz(2, 3) = 0
- End Sub
- Private Sub Form1_Shown(sender As Object, e As EventArgs) Handles MyBase.Shown
- RadioButton1.Checked = False
- RadioButton2.Checked = False
- RadioButton3.Checked = False
- Button1.Visible = False
- End Sub
- Private Sub RadioButton1_CheckedChanged(sender As Object, e As EventArgs) Handles RadioButton1.CheckedChanged
- xmatriz(2, 1) = 1
- Button1.Visible = True
- End Sub
- Private Sub RadioButton2_CheckedChanged(sender As Object, e As EventArgs) Handles RadioButton2.CheckedChanged
- xmatriz(2, 1) = 2
- Button1.Visible = True
- End Sub
- Private Sub RadioButton3_CheckedChanged(sender As Object, e As EventArgs) Handles RadioButton3.CheckedChanged
- xmatriz(2, 1) = 3
- Button1.Visible = True
- End Sub
- Private Sub RadioButton6_CheckedChanged(sender As Object, e As EventArgs) Handles RadioButton6.CheckedChanged
- xmatriz(2, 2) = 1
- Button2.Visible = True
- End Sub
- Private Sub RadioButton5_CheckedChanged(sender As Object, e As EventArgs) Handles RadioButton5.CheckedChanged
- xmatriz(2, 2) = 2
- Button2.Visible = True
- End Sub
- Private Sub RadioButton4_CheckedChanged(sender As Object, e As EventArgs) Handles RadioButton4.CheckedChanged
- xmatriz(2, 2) = 3
- Button2.Visible = True
- End Sub
- Private Sub RadioButton9_CheckedChanged(sender As Object, e As EventArgs) Handles RadioButton9.CheckedChanged
- xmatriz(2, 3) = 1
- Button5.Visible = True
- PictureBox5.Visible = True
- End Sub
- Private Sub RadioButton8_CheckedChanged(sender As Object, e As EventArgs) Handles RadioButton8.CheckedChanged
- xmatriz(2, 3) = 2
- Button5.Visible = True
- PictureBox5.Visible = True
- End Sub
- Private Sub RadioButton7_CheckedChanged(sender As Object, e As EventArgs) Handles RadioButton7.CheckedChanged
- xmatriz(2, 3) = 3
- Button5.Visible = True
- PictureBox5.Visible = True
- End Sub
- Private Sub Label3_Click(sender As Object, e As EventArgs) Handles Label3.Click
- End Sub
- Private Sub PictureBox5_Click(sender As Object, e As EventArgs) Handles PictureBox5.Click
- Dim i, xcorrectas As Integer
- xcorrectas = 0
- For i = 1 To 3
- If xmatriz(1, i) = xmatriz(2, i) Then
- xcorrectas = xcorrectas + 1
- End If
- Next i
- MsgBox("Acertou" & Str(xcorrectas) & " perguntas.", 64, "Resultado")
- GroupBox1.Visible = False
- GroupBox2.Visible = False
- GroupBox3.Visible = False
- End Sub
- Private Sub PictureBox4_Click(sender As Object, e As EventArgs) Handles PictureBox4.Click
- End
- End Sub
- End Class
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement