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?
:confused:
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.
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.