Public Class Form1
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
End
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
PictureBox1.Visible = False 'hide picture
Label1.Text = CStr(Int(Rnd() * 10)) 'pick numbers
Label2.Text = CStr(Int(Rnd() * 10))
Label3.Text = CStr(Int(Rnd() * 10))
'if any number is 7 display picture and play sound
If (Label1.Text = "5") Or (Label2.Text = "5") _
Or (Label3.Text = "5") Then
PictureBox1.Visible = True
Beep()
End If
End Sub
End Class
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
End
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
PictureBox1.Visible = False 'hide picture
Label1.Text = CStr(Int(Rnd() * 10)) 'pick numbers
Label2.Text = CStr(Int(Rnd() * 10))
Label3.Text = CStr(Int(Rnd() * 10))
'if any number is 7 display picture and play sound
If (Label1.Text = "5") Or (Label2.Text = "5") _
Or (Label3.Text = "5") Then
PictureBox1.Visible = True
Beep()
End If
End Sub
End Class
