hey nesecito su ayuda con un pequeño control ciber lo que pasa es que nos se como hacer que el siquiente cronometro inicie porque cuando lo cambio me toma como inicio el primer timer
aqui esta el codigo
Public Class Form1
Private Hora As Integer = 0
Private minuto As Integer = 0
Private segundo As Integer = 0
Private milisegundo As Integer = 0
Sub mostrartiempo()
Label1.Text = Hora.ToString.PadLeft(2, "0") & ":"
Label2.Text = minuto.ToString.PadLeft(2, "0") & ":"
Label3.Text = segundo.ToString.PadLeft(2, "0") & ":"
Label4.Text = milisegundo.ToString.PadLeft(2, "0") & ":"
Label1.Refresh()
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Timer1.Enabled = True
End Sub
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
milisegundo += 1
If milisegundo = 9 Then
milisegundo = 0
segundo += 1
If segundo = 59 Then
segundo = 0
minuto += 1
If minuto = 59 Then
minuto = 0
Hora += 1
End If
End If
End If
mostrartiempo()
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Timer1.Enabled = False
End Sub
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
Hora = 0
minuto = 0
segundo = 0
milisegundo = 0
mostrartiempo()
End Sub
Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click
End
End Sub
Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button5.Click
Dim p, tm, th As Decimal
tm = Convert.ToDecimal(Label2.Text.Replace(":", "")) * 0.01
th = Convert.ToDecimal(Label1.Text.Replace(":", "")) * 0.6
p = (tm + th)
MsgBox("lo gastado es: " & p)
End Sub
Private Sub Button6_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button6.Click
Timer2.Enabled = True
End Sub
Private Sub Timer2_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer2.Tick
milisegundo += 1
If milisegundo = 9 Then
milisegundo = 0
segundo += 1
If segundo = 59 Then
segundo = 0
minuto += 1
If minuto = 59 Then
minuto = 0
Hora += 1
End If
End If
End If
mostrartiempo()
End Sub
Private Sub Button7_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button7.Click
Timer2.Enabled = False
End Sub
Private Sub Button8_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button8.Click
Hora = 0
minuto = 0
segundo = 0
milisegundo = 0
mostrartiempo()
End Sub
Private Sub Button10_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button10.Click
End
End Sub
Private Sub Button9_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button9.Click
Dim p, tm, th As Decimal
tm = Convert.ToDecimal(Label8.Text.Replace(":", "")) * 0.01
th = Convert.ToDecimal(Label7.Text.Replace(":", "")) * 0.6
p = (tm + th)
MsgBox("lo gastado es: " & p)
End Sub
End Class
nesecito su ayuda programadores