Para crear este cronómetro de forma fácil, utilizaremos tres Button, cuatro Label y un Timer:
Fuente: https://www.yalpublicidad.com/blog/crear-cronometro-en-visual-basic-2008
YAL PUBLICIDAD
Yuri Lizama A.
website:
http://www.yalpublicidad.com/
Public Class Form1 Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Timer1.Start() End Sub Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Timer1.Stop() End Sub Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Label1.Text = "0" Label2.Text = "00" Label3.Text = "00" Label4.Text = "0" End Sub Private Sub Timer1_Tick(ByVal sender As System.object, ByVal e System.EventArgs) Timer1.Interval = 10 Label4.Text += 1 If Label4.Text = "60" Then Label3.Text += 1 Label4.Text = 0 End If If Label3.Text = 60 Then Label2.Text += 10 Label3.Text = 00 End If If Label2.Text = 60 Then Label1.Text += 10 Label4.Text = 00 End If End Sub End Class
Fuente: https://www.yalpublicidad.com/blog/crear-cronometro-en-visual-basic-2008
YAL PUBLICIDAD
Yuri Lizama A.
website:
http://www.yalpublicidad.com/
Comentarios
Publicar un comentario