|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
DownloadCompleteis there such thing as DownloadComplete for AxSHDocVw.AxWebBrowser?
and if there is, what is the name for the event object? GS,
> is there such thing as DownloadComplete for AxSHDocVw.AxWebBrowser? You seems to be for me a funny guy.> I have given you the link to that yesterday. Cor Show quoteHide quote "GS" <gsmsnews.microsoft.co***@msnews.Nomail.com> schreef in bericht news:e6gYW2K1GHA.1252@TK2MSFTNGP04.phx.gbl... > is there such thing as DownloadComplete for AxSHDocVw.AxWebBrowser? > > and if there is, what is the name for the event object? > > 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. Show quoteHide quote "Cor Ligthert [MVP]" <notmyfirstn***@planet.nl> wrote in message news:u0xRo7L1GHA.2196@TK2MSFTNGP06.phx.gbl... > GS, > > > is there such thing as DownloadComplete for AxSHDocVw.AxWebBrowser? > > > You seems to be for me a funny guy. > I have given you the link to that yesterday. > > Cor > > "GS" <gsmsnews.microsoft.co***@msnews.Nomail.com> schreef in bericht > news:e6gYW2K1GHA.1252@TK2MSFTNGP04.phx.gbl... > > is there such thing as DownloadComplete for AxSHDocVw.AxWebBrowser? > > > > and if there is, what is the name for the event object? > > > > > > "GS" <gsmsnews.microsoft.co***@msnews.Nomail.com> schrieb: What about this solution?> 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 /// -- M S Herfried K. Wagner M V P <URL:http://dotnet.mvps.org/> V B <URL:http://dotnet.mvps.org/dotnet/faqs/> thank you for setting me on the right track.
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. Show quoteHide quote "Herfried K. Wagner [MVP]" <hirf-spam-me-here@gmx.at> wrote in message news:ehjlrPZ1GHA.2516@TK2MSFTNGP06.phx.gbl... > "GS" <gsmsnews.microsoft.co***@msnews.Nomail.com> schrieb: > > 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. > > What about this solution? > > \\\ > 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 > /// > > -- > M S Herfried K. Wagner > M V P <URL:http://dotnet.mvps.org/> > V B <URL:http://dotnet.mvps.org/dotnet/faqs/> > "GS" <gsmsnews.microsoft.co***@msnews.Nomail.com> schrieb: Select the control in VS' text editor's left combobox and choose the event > is there such thing as DownloadComplete for AxSHDocVw.AxWebBrowser? from the combobox on the right top edge of the text editor. -- M S Herfried K. Wagner M V P <URL:http://dotnet.mvps.org/> V B <URL:http://dotnet.mvps.org/dotnet/faqs/> |
|||||||||||||||||||||||