Public Class Form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Label3.Text = "9"
Label5.Text = "99"
Timer1.Start()
Button2.Enabled = True
Button1.Enabled = False
Label2.Text = "100"
End Sub
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
Timer1.Interval = 1
Label5.Text -= 1
If Label5.Text = "0" Then
Label5.Text = "99"
Label3.Text -= 1
End If
If Label3.Text = "0" And Label5.Text = "1" Then
Timer1.Stop()
Label5.Text = "00"
MsgBox("Has perdido con " + Label2.Text + " clicks restantes", MsgBoxStyle.Exclamation, "Has Perdido")
Button2.Enabled = False
Button1.Enabled = True
End If
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Label2.Text -= 1
If Label2.Text = "0" Then
Timer1.Stop()
MsgBox("Has ganado en " + Label3.Text + " segundos y " + Label5.Text + " centesimas", MsgBoxStyle.Information, "Has Ganado")
Button2.Enabled = False
Button1.Enabled = True
End If
End Sub
Private Sub SalirToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SalirToolStripMenuItem.Click
MsgBox("Gracias por preferirnos")
Me.Dispose()
End Sub
Private Sub AcercaDelJuegoToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles AcercaDelJuegoToolStripMenuItem.Click
MsgBox("Calculadora creada por: Edward Matias Morales Viera" + vbCrLf & "Por más informacion: Sitio Web:www.servicerepair.uphero.com", vbInformation)
End Sub
End Class
No hay comentarios:
Publicar un comentario