Results 1 to 5 of 5

Thread: [RESOLVED]help on timer

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Aug 2009
    Posts
    126

    Resolved [RESOLVED]help on timer

    ..

    i dont know how to handle timer in this situation..

    if timer reach 5 seconds then
    something.visible = true
    end if

    if timer reach 7 seconds then
    something.visible = false
    end if


    what is the exact code on timer reach seconds then?

    Last edited by Joke Sparrow; Oct 7th, 2009 at 06:21 AM.

  2. #2
    Lively Member Raiser's Avatar
    Join Date
    Oct 2009
    Location
    Tamilnadu,India.
    Posts
    68

    Re: help on timer

    Declare any integer variable..

    For example

    Code:
    Dim secs as integer
     
      secs=0
    
      private sub Timer1_Timer()
    
      secs=secs+1
      if secs=5 then
            something.visible = true
      elseif secs=7 then
            something.visible = false
     endif
    
    end sub
    Just define 1000 ms for your timer interval..

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Aug 2009
    Posts
    126

    Re: help on timer

    i does not work..
    have you try this code?

    and
    where can put the declaretion?
    is it inside the timer sub?
    Last edited by Joke Sparrow; Oct 7th, 2009 at 06:04 AM.

  4. #4
    Lively Member Raiser's Avatar
    Join Date
    Oct 2009
    Location
    Tamilnadu,India.
    Posts
    68

    Re: help on timer

    No.. You should not put inside the Timer_ sub..

    You can put inside Form_load or any other event..

  5. #5

    Thread Starter
    Lively Member
    Join Date
    Aug 2009
    Posts
    126

    Re: help on timer

    thanks raizer it works now

    i put
    secs = 0 inside the form load..

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