Results 1 to 3 of 3

Thread: Loop? (repeat every x sec)

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Nov 2006
    Posts
    21

    Loop? (repeat every x sec)

    I'am making a program that auto refresh a link, every 5 sec.

    Start (button1)
    Stop (button2)
    Webbrowser (webbrowser1)
    Textbox (textbox1)

    So people write the link in the textbox. And then they press "Start"
    And then the program refresh the link every 5 sec. If they click on "stop", then the refreshing stops.
    But I dont know how I can make it...
    Shoul i add a timer?

    _
    "Start" code:
    WebBrowser1.Navigate (TextBox.Text)
    But how can I do like it gets refreshed every 5 sec?

    And how do I stop the refreshing with the "Stop" button?


  2. #2
    Hyperactive Member
    Join Date
    Apr 2005
    Location
    Indiana
    Posts
    451

    Re: Loop? (repeat every x sec)

    You could have it so that when they press start, you reload the page and inject a meta refresh tag into the page that refreshes every 5 seconds. When they press stop, you reload the page without the meta refresh tag.
    Ben


    Using Visual Basic 2005/2008

  3. #3
    PowerPoster stanav's Avatar
    Join Date
    Jul 2006
    Location
    Providence, RI - USA
    Posts
    9,290

    Re: Loop? (repeat every x sec)

    Use a timer and set its interval to 5000 (5 seconds). In the timer.tick event handler, you just refresh the page.

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