Rabu, 08 Juli 2009

Tugas STData

listing timer

Dim awal, akhir, lama As Single
Private Sub Command1_Click()
If Command1.Caption = "Start" Then

awal = Now
Text1.Text = Format(awal, "hh:mm:ss")
Command1.Caption = "Stop"
ElseIf Command1.Caption = "Stop" Then
akhir = Now
lama = akhir - awal
Text2.Text = Format(akhir, "hh:mm:ss:")
Text3.Text = Format(lama, "hh:mm:ss")
Command1.Caption = "selesai"
ElseIf Command1.Caption = "selesai" Then
End
End If
End Sub

Private Sub Timer1_Timer()
If Command1.Caption = "Stop" Then
Text2.Text = Format(Now, "hh:mm:ss")
Text3.Text = Format(Now - awal, "hh:mm:ss")
End If
End Sub

Tidak ada komentar: