Setelah Membuat Tampilan Seperti pada Gambar, Masukan Listing Program Berikut:
Option Explicit
Private Sub Command1_Click()
Select Case Command1.Caption
Case “Start”
Timer1.Enabled = True
Command1.Caption = “Stop”
Case “Stop”
Timer1.Enabled = False
Command1.Caption = “Start”
End Select
End Sub
Private Sub Timer1_Timer()
text1.Text = text1.Text + 1
End Sub
Private Sub text1_Change()
If text1.Text = “59″ Then
text1.Text = “00″
text2.Text = text2.Text + 1
End If
text1.Text = Format(text1.Text, “00″)
End Sub
Private Sub txt2_Change()
If text2.Text = “59″ Then
text2.Text = “00″
text3.Text = text3.Text + 1
End If
text2.Text = Format(text2.Text, “00″)
End Sub
Private Sub txt3_Change()
text3.Text = Format(text3.Text, “00″)
End Sub
0 komentar :
Posting Komentar