Rabu, 06 Juni 2012

Filled Under:

Cara Membuat Stop Watch Dengan VB

Visual Basic
Buatlah Sebuah Form Seperti Pada Gambar.

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

Unknown

Author & Editor

Hal sederhana yang wajib diketahui. 1 catatan lebih baik dari 1000 ingatan

0 komentar :

Posting Komentar

 

Copyright © Website Arek Pamekasan ™ is a registered trademark.
Blogger Templates Designed by Templateism . Hosted on Blogger Platform.