|
-
Sep 15th, 2007, 02:04 PM
#1
Thread Starter
Junior Member
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?
-
Sep 15th, 2007, 02:47 PM
#2
Hyperactive Member
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
-
Sep 15th, 2007, 04:22 PM
#3
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|