From: Scott Baxter on
Hello,

When trying to get the html from a web browser control, some web sites keep
downloading html after the webbrowserreadystate.complete flag is set. You
can determine this by rechecking the length of the html each time the
routine is called. I want to find a sure fire flag that the complete html
is ready.

Anybody have the answer?

Please see code for the document completed routine below.

Thanks.

Scott

Private Sub WebBrowser1_DocumentCompleted(ByVal sender As System.Object,
ByVal e As System.Windows.Forms.WebBrowserDocumentCompletedEventArgs)
Handles WebBrowser1.DocumentCompleted


Dim str1 As String = ""

If (WebBrowser1.ReadyState = WebBrowserReadyState.Complete) Then
dim str1 as string=""
For Each ClientControl As HtmlElement In
WebBrowser1.Document.All
If ClientControl.GetAttribute("tagName") = "HEAD" Then
str1 &= ClientControl.GetAttribute("outerHTML")
End If
If ClientControl.GetAttribute("tagName") = "BODY" Then
str1 &= ClientControl.GetAttribute("outerHTML")
End If

Next

MessageBox.Show(str1.Length.ToString)

End If



End Sub

From: Nobody on
"Scott Baxter" <scott(a)websearchstore.com> wrote in message
> sender As System.Object,

This group is for VB6 and earlier(VB Classic). VB.Net and all dotnet groups
have either "dotnet" or "vsnet" in the group name. Please use the following
group instead:

news://msnews.microsoft.com/microsoft.public.dotnet.languages.vb




From: Bob Butler on

"Scott Baxter" <scott(a)websearchstore.com> wrote in message
news:uc1Dqtw5KHA.5808(a)TK2MSFTNGP02.phx.gbl...
> Hello,
>
> When trying to get the html from a web browser control, some web sites
> keep downloading html after the webbrowserreadystate.complete flag is set.
> You can determine this by rechecking the length of the html each time the
> routine is called. I want to find a sure fire flag that the complete html
> is ready.
>
> Anybody have the answer?
>
> Please see code for the document completed routine below.
>
> Thanks.
>
> Scott
>
> Private Sub WebBrowser1_DocumentCompleted(ByVal sender As System.Object,
> ByVal e As System.Windows.Forms.WebBrowserDocumentCompletedEventArgs)
> Handles WebBrowser1.DocumentCompleted

This group is for VB 6 and earlier; yor code is VB.Net. You need to ask in
a group with "dotnet" in the name.

 | 
Pages: 1
Prev: Visual Basic.net
Next: Auto Refreshing in vb6.0