feedburner
Enter your email address:

Delivered by FeedBurner

feedburner count

Making Stopwatch

Okey. Open Vb 6 , select STANDARD .EXE . Add 6 labels ( label4 rename : lblStart , label5 ren : lblEnd , label6 ren : lblElapsed and make them Fixed Single in border style ) and 3 buttons. Like me.
Lets write the code now.


Dim StartTime As Variant
Dim EndTime As Variant
Dim ElapsedTime As Variant


Private Sub Command1_Click()
StartTime = Now
lblStart.Caption = Format(StartTime, "hh:mm:ss")
lblEnd.Caption = ""
lblElapsed.Caption = ""
End Sub


Private Sub Command2_Click()
EndTime = Now
ElapsedTime = EndTime - StartTime
lblEnd.Caption = Format(EndTime, "hh:mm:ss")
lblElapsed.Caption = Format(ElapsedTime, "hh:mm:ss")
End Sub


Private Sub Command3_Click()
Unload Me
End Sub


Thats all. Test it.
If u have any questions , suggestions or if u find bugs leave a comment.




0 comments:

Post a Comment