not quite as smart programmaticall y as in younger days? maybe. However I did
see the link but could not get vb express to show anything close to
downloadcomplet e
after some further research, I end up doing
Public Event DownloadComplet e(ByVal sender As Object, ByVal e As EventArgs)
Private Sub webBrowser_Down loadComplete(By Val sender As Object, ByVal e As
EventArgs) Handles webBrowser.Down loadComplete
RaiseEvent DownloadComplet e(sender, e)
End Sub
However, I found out that does not work the way I want. Donwload Complete
fires mnaytimes, while the so call navigatecomplet e fires when the browser
may still be trying to render page. consequently that is not good enough
for my task.
"Cor Ligthert [MVP]" <notmyfirstname @planet.nlwrote in message
news:u0xRo7L1GH A.2196@TK2MSFTN GP06.phx.gbl...
GS,
>
is there such thing as DownloadComplet e for AxSHDocVw.AxWeb Browser?
You seems to be for me a funny guy.
I have given you the link to that yesterday.
>
Cor
>
"GS" <gsmsnews.micro soft.comGS@msne ws.Nomail.comsc hreef in bericht
news:e6gYW2K1GH A.1252@TK2MSFTN GP04.phx.gbl...
is there such thing as DownloadComplet e for AxSHDocVw.AxWeb Browser?
and if there is, what is the name for the event object?
However, I found out that does not work the way I want. Donwload Complete
fires mnaytimes, while the so call navigatecomplet e fires when the browser
may still be trying to render page. consequently that is not good enough
for my task.
What about this solution?
\\\
Private Sub WebBrowser1_Doc umentCompleted( _
ByVal sender As Object, _
ByVal e As WebBrowserDocum entCompletedEve ntArgs _
) Handles WebBrowser1.Doc umentCompleted
If Me.WebBrowser1. ReadyState = WebBrowserReady State.Complete Then
MsgBox("Documen t and frames loaded!")
End If
End Sub
///
--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>
Since I don't work directly with webbrowser control but the encapsulated
AxSHDocVw.DWebB rowserEvents2_D ocumentComplete Event as webOCWrapper
I had your idea added there.
Private Sub webBrowser_Docu mentComplete(By Val sender As Object, ByVal e
As AxSHDocVw.DWebB rowserEvents2_D ocumentComplete Event) Handles
webBrowser.Docu mentComplete
Try
doc = CType(webBrowse r.Document, MSHTML.HTMLDocu ment)
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.R eadyState = WebBrowserReady State.Complete Then
'MsgBox("Docume nt and frames loaded!")
RaiseEvent TopLevelDocumen tComplete(sende r, e)
End If
End Sub
and TopLevelDocumen tComplete was declared there as
TopLevelDocumen tComplete
Those accomplish what I need. thank you all again for all your patience.
"Herfried K. Wagner [MVP]" <hirf-spam-me-here@gmx.atwrot e in message
news:ehjlrPZ1GH A.2516@TK2MSFTN GP06.phx.gbl...
However, I found out that does not work the way I want. Donwload
Complete
fires mnaytimes, while the so call navigatecomplet e fires when the
browser
may still be trying to render page. consequently that is not good
enough
for my task.
>
What about this solution?
>
\\\
Private Sub WebBrowser1_Doc umentCompleted( _
ByVal sender As Object, _
ByVal e As WebBrowserDocum entCompletedEve ntArgs _
) Handles WebBrowser1.Doc umentCompleted
If Me.WebBrowser1. ReadyState = WebBrowserReady State.Complete Then
MsgBox("Documen t and frames loaded!")
End If
End Sub
///
>
--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>
>
Comment