Results 1 to 4 of 4

Thread: Using timer

  1. #1

    Thread Starter
    New Member
    Join Date
    Nov 1999
    Location
    fort wayne,IN, usa
    Posts
    12

    Post

    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.

  2. #2
    New Member
    Join Date
    Nov 1999
    Posts
    10

    Post

    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

  3. #3
    New Member
    Join Date
    Nov 1999
    Posts
    10

    Post

    By the way, the above code goes in the timer event function.

  4. #4
    DaoK
    Guest
    You can always use a variable and increase it each second.

    and have a select case:
    Example :
    VB Code:
    1. 'Timer1 with interval 1000
    2. Static mySecond as long
    3. mySecond = mySecond +1
    4. Select case mySecond
    5.  
    6. Case 120
    7.  
    8. Case 240
    9.  
    10. Case '...
    11.  
    12. End Select

    Daok

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width