How could I get the listing of all pictures on a webpage, using the WebBrowser control? Couldn't find help on the topic. Thanks.
Chris
I'd use the Inet control to get the source - and then string parse out the '<img' tag... That'd get you the image listing and image paths... Cheers!
"Lies, sanctions, and cruise missiles have never created a free and just society. Only everyday people can do that." - Zack de la Rocha Hear me roar.
You can use the Document Object Model's images collections: VB Code: Dim i As Integer For i = 0 To WebBrowser1.Document.images.length - 1 MsgBox WebBrowser1.Document.images.Item(i).getAttribute("src") Next
Dim i As Integer For i = 0 To WebBrowser1.Document.images.length - 1 MsgBox WebBrowser1.Document.images.Item(i).getAttribute("src") Next
Author for Visual Basic Web Magazine My articles on the Web Browser Control: Using the Web Browser Control & Using the DHTML Document Object Model The examples referenced in the articles can be found here:Example Web Browser Application Example DHTML DOM Application
Forum Rules