I have a problem and know it will be a easy fix but for some reason i cant get my head around it.
here is my code
Dim PageElements As HtmlElementCollection = WebBrowser1.Document.GetElementsByTagName("img")
For Each CurElement As HtmlElement In PageElements
listbox1.items.add(CurElement.GetAttribute("src"))
Next
Now what I want to do is grab only one so is there any thing I could replace the 'FOR EACH' with?
Many thanks,
Joel
here is my code
Dim PageElements As HtmlElementCollection = WebBrowser1.Document.GetElementsByTagName("img")
For Each CurElement As HtmlElement In PageElements
listbox1.items.add(CurElement.GetAttribute("src"))
Next
Now what I want to do is grab only one so is there any thing I could replace the 'FOR EACH' with?
Many thanks,
Joel