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
Printable View
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'tQuote:
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
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
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.
Thanks everybody and i will try that kleinma