Dim saat, dakika, saniye
Private Sub Command1_Click()
Timer1.Enabled = True
End Sub
Private Sub Command2_Click()
Timer1.Enabled = False
End Sub
Private Sub Command3_Click()
saniye = 0
saat = 0
dakika = 0
Label1.Caption = "00"
Label2.Caption = "00"
Label3.Caption = "00"
End Sub
Private Sub Form_Load()
Label1.Caption = "00"
Label2.Caption = "00"
Label3.Caption = "00"
Timer1.Interval = 1000
Timer1.Enabled = False
End Sub
Private Sub Timer1_Timer()
saniye = saniye + 1
If saniye = 60 Then
saniye = 0
dakika = dakika + 1
If dakika = 60 Then
dakika = 0
saat = saat + 1
If saat = 24 Then
saat = 0
End If
End If
End If
If saat < 10 Then
Label1.Caption = "0" & Str(saat)
Else
Label1.Caption = saat
End If
If dakika < 10 Then
Label2.Caption = "0" & Str(dakika)
Else
Label2.Caption = dakika
End If
If saniye < 10 Then
Label3.Caption = "0" & Str(saniye)
Else
Label3.Caption = saniye
End If
End Sub