Jan 22nd, 2003, 06:07 PM
#1
Thread Starter
New Member
Timer Countdown
im trying to make a scorekeeping program but im having problems with the timer. Its suppose to count down in minutes and seconds from 8 minutes until it gets to 0. i cant figure out how to get the seconds. I also need a button to stop and start the clock and reset it. can anyone help me?
Jan 22nd, 2003, 06:44 PM
#2
VB Code:
Option Explicit
Dim dteStart As Date
Private Sub Command1_Click()
dteStart = DateAdd("n", 8, Now)
Timer1.Enabled = True
Timer1.Interval = 1000
Label1.Caption = "8 00"
End Sub
Private Sub Timer1_Timer()
Label1.Caption = Format((dteStart - Now), "n ss")
If Label1.Caption = "0 00" Then
Timer1.Enabled = False
End If
End Sub
Jan 22nd, 2003, 06:53 PM
#3
Thread Starter
New Member
thanks! is it possible to stop the timer and then start it again where it left off?
Jan 22nd, 2003, 07:42 PM
#4
Check out the attached form for a full example.
Attached Files
Jan 22nd, 2003, 08:01 PM
#5
Thread Starter
New Member
thank you very much, it worked perfect
Jan 22nd, 2003, 08:49 PM
#6
Thread Starter
New Member
thank you very much, it worked perfect
Posting Permissions
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
Forum Rules
Click Here to Expand Forum to Full Width