A
Andy B.
I have the code below in the MainForm of the program. The browser control is
in a tabPage that doesn't receive focus when the program starts. I will have
3 or so tabs on this form with web browser controls on each tab. How would I
make the DocumentComplete event fire even when the browsers don't have
focus?
[code:18 lines]
Imports WeatherBuilder
Public Class MainForm
Private Sub WeatherBug_Load(ByVal sender As Object, ByVal e As
System.EventArgs) Handles Me.Load
WebBrowser1.Navigate("about: blank")
End Sub
Private Sub WebBrowser1_DocumentCompleted(ByVal sender As System.Object,
ByVal e As System.Windows.Forms.WebBrowserDocumentCompletedEventArgs)
If e.Url.OriginalString = "about: blank" Then
Dim LiveConditions As New Weather.LiveWeatherData()
LiveConditions = WeatherGenerator.GetLiveConditionsByZipCode("49001",
Weather.UnitType.English)
LiveConditionsToHtml(LiveConditions, WebBrowser1)
End If
End Sub
End Class
in a tabPage that doesn't receive focus when the program starts. I will have
3 or so tabs on this form with web browser controls on each tab. How would I
make the DocumentComplete event fire even when the browsers don't have
focus?
[code:18 lines]
Imports WeatherBuilder
Public Class MainForm
Private Sub WeatherBug_Load(ByVal sender As Object, ByVal e As
System.EventArgs) Handles Me.Load
WebBrowser1.Navigate("about: blank")
End Sub
Private Sub WebBrowser1_DocumentCompleted(ByVal sender As System.Object,
ByVal e As System.Windows.Forms.WebBrowserDocumentCompletedEventArgs)
If e.Url.OriginalString = "about: blank" Then
Dim LiveConditions As New Weather.LiveWeatherData()
LiveConditions = WeatherGenerator.GetLiveConditionsByZipCode("49001",
Weather.UnitType.English)
LiveConditionsToHtml(LiveConditions, WebBrowser1)
End If
End Sub
End Class