No evento timer
No evento button
Private Sub Timer2_Tick(ByVal sender As
System.Object, ByVal
e As System.EventArgs)
Handles Timer2.Tick
Dim h, min, seg As String
h =
Split(Label1.Text, ":")(0)
min =
Split(Label1.Text, ":")(1)
seg =
Split(Label1.Text, ":")(2)
If Int(seg) < 59 Then
seg = Int(seg) + "01"
Else
min = Int(min) + "01"
seg = "00"
End If
If Int(min) > 59 Then
h
= Int(h) + "01"
min = "00"
End If
Label1.Text = h & ":" & min & ":" & seg
End Sub
Private Sub Button2_Click(ByVal
sender As System.Object,
ByVal e As
System.EventArgs) Handles
Button2.Click
Timer2.Enabled = True
End Sub
0 comentários:
Postar um comentário