Results 1 to 6 of 6

Thread: [RESOLVED] Timer/interval problem

  1. #1

    Thread Starter
    Addicted Member rabid lemming's Avatar
    Join Date
    Feb 2005
    Posts
    210

    Resolved [RESOLVED] Timer/interval problem

    Hey,

    I'd like to create timer or interval (which ever works best) that I can use with the from on load event. When the forum loads I want a timer to wait for say 5 seconds and then call a function.

    My Problem is everything I try, the from load calls the timer ok but the form won't show till the timer has elapsed. I need the from to load and show everything. Then call the timer and when the timer time has elapsed, call the function ?

    Any help would be greatly appreciated

    Cheers
    Rabid Lemming

  2. #2
    Hyperactive Member gjon's Avatar
    Join Date
    Nov 2004
    Location
    Inescapable Void
    Posts
    442

    Re: Timer/interval problem

    Set the timer property in form design view with 5000 for 5 seconds and set enabled to true.
    Then in the timer sub, do your thing.

    VB Code:
    1. Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
    2.         StatusBarPanel2.Text = Now.ToLongTimeString
    3.  
    4.     End Sub

    For example, my timer interval is set to 1000 and it is also set to enabled = true.
    So basically every second there will be a call to the client time and it will display it.

  3. #3

    Thread Starter
    Addicted Member rabid lemming's Avatar
    Join Date
    Feb 2005
    Posts
    210

    Re: Timer/interval problem

    Wow!!! Thank you both very much that was extremely helpful

  4. #4

    Thread Starter
    Addicted Member rabid lemming's Avatar
    Join Date
    Feb 2005
    Posts
    210

    Re: Timer/interval problem

    Thanks

    I will wait for death with a smile and a big stick

  5. #5
    Hyperactive Member gjon's Avatar
    Join Date
    Nov 2004
    Location
    Inescapable Void
    Posts
    442

    Re: Timer/interval problem

    Glad we could help.

  6. #6

    Thread Starter
    Addicted Member rabid lemming's Avatar
    Join Date
    Feb 2005
    Posts
    210

    Re: Timer/interval problem

    Thank you

    I will wait for death with a smile and a big stick

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