Hi All,
Given a collection of links, how can I send them to a WebBrowser Control so
that I can manipulate it's document? Ok, that's way too simplified of a
question. I know how to send a link to a WebBrowser:
/////
WebBroweser1.Na vigate(Link)
/////
but I can figure out how to send several links in succession. In my test,
I've got a simple collection that contains 5 strings. Pressing a command
button performs:
/////
For Each s As String In links
WebBrowser1.Nav igate(s)
Next
/////
and in the WebBrowser1's DocumentComplet ed Event is:
/////
Dim doc As HtmlDocument = WebBrowser1.Doc ument
Debug.Print(doc .Url.ToString)
/////
However, the only Url string ever printed to the immediate window is the
last one in the collection, and all the WebBrowser1 window ever shows is
that last webpage.
I realize this probably has something to do with synchronization , but I'm
not sure how to resolve this.
Thanks,
Lance
Given a collection of links, how can I send them to a WebBrowser Control so
that I can manipulate it's document? Ok, that's way too simplified of a
question. I know how to send a link to a WebBrowser:
/////
WebBroweser1.Na vigate(Link)
/////
but I can figure out how to send several links in succession. In my test,
I've got a simple collection that contains 5 strings. Pressing a command
button performs:
/////
For Each s As String In links
WebBrowser1.Nav igate(s)
Next
/////
and in the WebBrowser1's DocumentComplet ed Event is:
/////
Dim doc As HtmlDocument = WebBrowser1.Doc ument
Debug.Print(doc .Url.ToString)
/////
However, the only Url string ever printed to the immediate window is the
last one in the collection, and all the WebBrowser1 window ever shows is
that last webpage.
I realize this probably has something to do with synchronization , but I'm
not sure how to resolve this.
Thanks,
Lance
Comment