|
-
Jun 23rd, 2001, 09:19 PM
#1
Thread Starter
New Member
timer troubles
I'm working on a timer program and am having trouble writing the code to make a timer count down from a number that the user would enter. Any one have suggetions???
Thanks!
-
Jun 23rd, 2001, 09:21 PM
#2
seconds? minutes?
seconds:
enteredtime = wherever it comes from (textbox...inputbox)
set timer1.interval = 1000 (1000 per second)
Private Sub timer1_timer()
enteredtime = enteredtime - 1
label1 = enteredtime
end sub
minutes set timer interval = 60000
JPnyc rocks!! (Just ask him!)
If u have your answer please go to the thread tools and click "Mark Thread Resolved"
-
Jun 23rd, 2001, 09:48 PM
#3
Thread Starter
New Member
need timer to show minutes and seconds...
Hi again!
I need my timer to show minutes and seconds as it counts down. Syntax for that??? My book's section explaining timers and date/time syntax is terrible...
Raye...
-
Jun 23rd, 2001, 10:43 PM
#4
VB Code:
Dim tm As Integer
Private Sub Form_Load()
Timer1.Interval = 1000
tm = InputBox("enter minutes")
tm = tm * 60
End Sub
Private Sub Timer1_Timer()
tm = tm - 1
Label1 = Int(tm / 60) & ":" & (tm Mod 60)
End Sub
just a sample...
JPnyc rocks!! (Just ask him!)
If u have your answer please go to the thread tools and click "Mark Thread Resolved"
-
Jun 23rd, 2001, 11:12 PM
#5
Thread Starter
New Member
-
Jun 24th, 2001, 03:22 AM
#6
Registered User
Code:
Label1 = Int(tm / 60) & ":" & (tm Mod 60) ;)
-
Jun 24th, 2001, 09:21 AM
#7
Fanatic Member
How to
Let's say "pno" is the time of now. which is the command "Time".
so
Dim pno as string
pno = Time
and if the user haven't set the Current Form to Focus, in 5 minutes, the MSGBOX will popup.
How do you do that, Expert?

prog_tom
JOIN THE REVOLUTION!!!! Dual T3 backedup science community.
http://physics.sviesoft.com/forum
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
|