Wednesday, April 13, 2011

Make Application stopwatch WITH VISUAL BASIC

| Wednesday, April 13, 2011 | 2 comments

Make Application stopwatch
stopwatch is a handheld timepiece designed to measure the amount of time elapsed from a particular time when activated to when the piece is deactivated. A large digital version of a stopwatch designed for viewing at a distance, as in a sports stadium, is called a stopclock.




Make the form as follows:




Then create a form like the following
Set His estate:
Object
Property
Nilai
Form
Name
stopwatchs
Caption
stopwatch
Label1
Caption
START TIME
Label2
Caption
END TIME
Label3
Caption
TIME DIFFERENCE
Label4
Name
lblstart
Caption
delete
BorderStyle
1-Fixed Single
Label5
Name
lblfinish
Caption
delete
BorderStyle
1-Fixed Single
Label6
Name
lbldifference
Caption
delete
BorderStyle
1-Fixed Single
Command1
Name
cmdstart
Caption
START
Command2
Name
Cmdfinish
Caption
FINISH
Command3
Name
Cmdexit
Caption
EXIT




Program Listings:
1. Variable declaration, put in general
Dim start As Variant
Dim finish As Variant
Dim difference As Variant
2. Object cmdexit, Click Event
Private Sub cmdexit_Click ()
End
SubEnd End Sub

3. Object cmdstart, Click Event
Private Sub cmdstart_Click ()
start = Now
lblstart.Caption = Format (start, "hh: mm: ss")
End Sub
4. Object cmdfinish, Click Event
Private Sub cmdfinish_Click ()
finish = Now
difference = start - finish
lblfinish.Caption = Format (finish, "hh: mm: ss")
lbldifference.Caption = Format (difference, "hh: mm: ss")
End Sub



thank you for visiting my blog

2 comments:

Sang Penulis said...

mntaap..
tingkatkan truss yaa bro..

nino said...

thanks bro, follow me brow. hehehe

:)) ;)) ;;) :D ;) :p :(( :) :( :X =(( :-o :-/ :-* :| 8-} :)] ~x( :-t b-( :-L x( =))

Post a Comment

thank you for visiting my blog and comment here. I hope the commentary contains a comment which intend to build and repair. criticism and suggestions I gladly accept.

Popular Posts

 

Total Pageviews

stat

© Copyright 2010. http://programminghaha.blogspot.com . All rights reserved | http://programminghaha.blogspot.com is proudly powered by Blogger.com | Template by o-om.com - zoomtemplate.com