|
-
Nov 16th, 1999, 11:46 PM
#1
Thread Starter
New Member
Can we set the timer interval more than 1 minute ? like 5 minutes ? or any timer control can do this ?
-
Nov 16th, 1999, 11:54 PM
#2
Hyperactive Member
Do something like this:
Set the timer to one minute...
inside the timer increment a static integer.
when that integer reaches f.i. 5. you know that 5 minutes have passed..
So then again inside the timer do an if statement:
if i > 4 then 'where i is your static integer
'do yer stuf
endif
-
Nov 16th, 1999, 11:56 PM
#3
Hyperactive Member
Oeps.. don't forget to reset the static integer inside the if statement....
hasty Inhumanoid
-
Nov 16th, 1999, 11:56 PM
#4
The Timer Control only goes just over a Minute, but you can use it with the Timer Function to wait any Interval you like, eg.
Code:
Private Sub Form_Load()
'Set the Timer Control Interval to Less than a Minute
'The Higher the Value the Less Accurate it generally becomes.
Timer1.Interval = 1000
Timer1_Timer
End Sub
Private Sub Timer1_Timer()
Static tTimer As Single
'Check the difference between tTimer and Timer
'to get any Time Interval you want.
If tTimer = 0 Then tTimer = Timer
If (Timer - tTimer) >= 300 Then '5 Mins
MsgBox "5 Minutes have passed."
tTimer = Timer 'Reset for another 5 Mins
End If
End Sub
------------------
Aaron Young
Analyst Programmer
[email protected]
[email protected]
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
|