|
-
Mar 10th, 2003, 12:19 AM
#1
Thread Starter
Member
TIMER Question
hey everyone,
how can i get a vb timer control interval to go over 65,555 ms (1 minute) .... maybe at least every 10 minutes or more ??
Thanks,
Paolo
-
Mar 10th, 2003, 12:24 AM
#2
Re: TIMER Question
Originally posted by Pyabut
hey everyone,
how can i get a vb timer control interval to go over 65,555 ms (1 minute) .... maybe at least every 10 minutes or more ??
Thanks,
Paolo
well short answer: you can't
answer you want: the timer interval is an integer.. which is cause for its limitation.. but you can get around it 1 of 2 ways
1) there are Timer API functions and you can use them to create your own timer through code. If you are not familiar with the Win32 API then this might be difficult for you.
2) the easier way is to set the timer interval to 60000 (1 minute) and when the timer event fires, you increase a count variable by 1. When the variable = 10 then you run whatever code you want.. something like this
VB Code:
Private Sub Timer1_Timer()
Static intCount as integer
intCount = intCount + 1
if intCount = 10 then
intCount = 0
'Put code you want to run here
end if
End Sub
-
Mar 10th, 2003, 12:29 AM
#3
Addicted Member
get the timer to run and check the store the system time + 10 min and then check that time with the system time when they match or stored is greater that current run the code.
On Error wake up and try again ;-)
___________________________
ICQ # 65392645
email - [email protected]
Visual Studio 6 ent with SP5 Running on XP with an AMD 1.2 ThunderBird with 512 MB RAM And a 120GB primary HDD (very sweet)
-
Mar 10th, 2003, 12:50 AM
#4
Thread Starter
Member
Thanks everybody and i will try that kleinma
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
|