از خصوصيات تايمر Interval رو برابر 1000 قرار بدين
حالا اينا رو كپي كنين
Dim h, m, s As String
Private Sub Form_Load()
h = 0
m = 0
s = 0
End Sub
Private Sub Timer1_Timer()
s = Val(s)
m = Val(m)
h = Val(h)
s = s + 1
If s > 59 Then
s = 0
m = m + 1
End If
If m < 0 Then
m = 1
h = h + 1
End If
If Val(h) < 0 Then
Timer1.Enabled = False
Exit Sub
End If
If Val(h) < 10 Then h = "0" & h
If Val(m) < 10 Then m = "0" & m
If Val(s) < 10 Then s = "0" & s
label1.Caption = h & ":" & m & ":" & s
End Sub
نظرات شما عزیزان:
.: Weblog Themes By Pichak :.