not quite as smart programmatically as in younger days? maybe. However I did
see the link but could not get vb express to show anything close to
downloadcomplete
after some further research, I end up doing
Public Event DownloadComplete(ByVal sender As Object, ByVal e As EventArgs)
Private Sub webBrowser_DownloadComplete(ByVal sender As Object, ByVal e As
EventArgs) Handles webBrowser.DownloadComplete
RaiseEvent DownloadComplete(sender, e)
End Sub
However, I found out that does not work the way I want. Donwload Complete
fires mnaytimes, while the so call navigatecomplete fires when the browser
may still be trying to render page. consequently that is not good enough
for my task.
However, I found out that does not work the way I want. Donwload Complete
fires mnaytimes, while the so call navigatecomplete fires when the browser
may still be trying to render page. consequently that is not good enough
for my task.
\\\
Private Sub WebBrowser1_DocumentCompleted( _
ByVal sender As Object, _
ByVal e As WebBrowserDocumentCompletedEventArgs _
) Handles WebBrowser1.DocumentCompleted
If Me.WebBrowser1.ReadyState = WebBrowserReadyState.Complete Then
MsgBox("Document and frames loaded!")
End If
End Sub
///
Since I don't work directly with webbrowser control but the encapsulated
AxSHDocVw.DWebBrowserEvents2_DocumentCompleteEvent as webOCWrapper
I had your idea added there.
Private Sub webBrowser_DocumentComplete(ByVal sender As Object, ByVal e
As AxSHDocVw.DWebBrowserEvents2_DocumentCompleteEvent) Handles
webBrowser.DocumentComplete
Try
doc = CType(webBrowser.Document, MSHTML.HTMLDocument)
Catch
' Not a fatal error - we might be hosting a Word doc in-place,
' e.g.
End Try
' Bubble up to our host.
If Me.webBrowser.ReadyState = WebBrowserReadyState.Complete Then
'MsgBox("Document and frames loaded!")
RaiseEvent TopLevelDocumentComplete(sender, e)
End If
End Sub
and TopLevelDocumentComplete was declared there as
TopLevelDocumentComplete
Those accomplish what I need. thank you all again for all your patience.
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.