Web Browser Refresh?

voideyez

Member
Joined
May 19, 2006
Messages
5
Programming Experience
Beginner
What code can I use to allow the Web browser to refresh every 15 seconds or so?

I am using Visual Basic 2005 Express version.

Thank you.:)
 
voideyez said:
What code can I use to allow the Web browser to refresh every 15 seconds or so?

I am using Visual Basic 2005 Express version.

Thank you.:)
Add a Timer to the project and set the interval to 1500 (15seconds) and Enabled. Doubleclick the Timer to enter the Tick event in code where you call the WebBrowser Refresh method. (you can also specify WebBrowserRefreshOption if needed)
VB.NET:
[SIZE=2][COLOR=#0000ff]Private [/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]Sub[/COLOR][/SIZE][SIZE=2] Timer1_Tick([/SIZE][SIZE=2][COLOR=#0000ff]ByVal[/COLOR][/SIZE][SIZE=2] sender [/SIZE][SIZE=2][COLOR=#0000ff]As[/COLOR][/SIZE][SIZE=2] System.Object, [/SIZE][SIZE=2][COLOR=#0000ff]ByVal[/COLOR][/SIZE][SIZE=2] e [/SIZE][SIZE=2][COLOR=#0000ff]As[/COLOR][/SIZE][SIZE=2] System.EventArgs) _
[/SIZE][SIZE=2][COLOR=#0000ff]Handles[/COLOR][/SIZE][SIZE=2] Timer1.Tick
  WebBrowser1.Refresh()
[/SIZE][SIZE=2][COLOR=#0000ff]End [/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]Sub
[/COLOR][/SIZE]

 
Back
Top