Public Class Form1
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
Timer1.Interval = 1000
Timer1.Start()
End Sub
Private Sub Timer1_Tick(sender As Object, e As EventArgs) Handles Timer1.Tick
Dim i As New Uri("http://m.weather.com.cn/m/pn8/weather.htm?id=101230901T")
WebBrowser1.Url = i
Refresh()
End Sub
End Class
不要把
Dim i As New Uri("http://m.weather.com.cn/m/pn8/weather.htm?id=101230901T")
WebBrowser1.Url = i
Refresh()
写在timer_tick事件中,不要用timer控件,直接写在FORM_load中,如果写在timer_tick中,每过Timer1.Interval = 1000,一秒就会刷新页面