Dav Lewis

Dav Lewis

  • NA
  • 8
  • 5.4k

How do I display webpage results in a listbox Visual Studio

Aug 5 2014 8:10 PM
Hello again I'm making a desktop app in visual Basic 2013. Its a person search by email. It can fill the websites search field in and submit it but I want to display the results in individual list or textboxes. This is the website  http://www.emailsherlock.com/

Here is a random search I did http://www.emailsherlock.com/emailsearch/[email protected]

You will see like Facebook, Flickr, Gravatar and many others. what I wanted to do was show each one of these in its own listbox.
This is where I'm up to so far. 

Public Class Form1
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
WebBrowser1.Navigate("http://www.usersherlock.com/")
End Sub

Private Sub TextBox1_TextChanged(sender As Object, e As EventArgs) Handles TextBox1.TextChanged
WebBrowser1.Document.GetElementById("email").SetAttribute("value", TextBox1.Text)
End Sub

Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
Dim allelements As HtmlElementCollection = WebBrowser1.Document.All
For Each webpageelement As HtmlElement In allelements
If webpageelement.GetAttribute("value") = "go" Then
webpageelement.InvokeMember("click")
End If
Next
End Sub
End Class

Im not good at explaining things so this is why I try to add as much info as possible 
        

Answers (1)