Click to See Complete Forum and Search --> : Using timer
yifeipan
Nov 13th, 1999, 10:07 AM
I have a problem using timer to control
{eventA 2 minutes then eventB}
4minutes then
{eventA 2 minutes then eventB}
4minutes then
{eventA 2 minutes then eventB}
.....
I appreciate your help.
bertie9
Nov 13th, 1999, 10:23 AM
If you set the timer to 2 minutes initially (120 * 1000) then after event b set the value to 4 minutes and then loop.
loop
event a
timer1.interval = 120 * 1000
event b
timer1.interval = 240 * 1000
end loop
I haven't tried it but that should do the trick
bertie9
Nov 13th, 1999, 10:36 AM
By the way, the above code goes in the timer event function.
DaoK
Dec 29th, 2001, 07:54 PM
You can always use a variable and increase it each second.
and have a select case:
Example :
'Timer1 with interval 1000
Static mySecond as long
mySecond = mySecond +1
Select case mySecond
Case 120
Case 240
Case '...
End Select
Daok
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.