I have almost made the program which gives urls from google and collect in listbox and sort found as i typed links and copy into richtextbox.
But i need to pick up all urls from google automatically from all pages.
Because now it does only 1 page.
Here is the part of my code in which i want to make it work.
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
WebBrowser1.Navigate("http://www.google.co.zw/search?num=100&hl=en&lr=&biw=1152&bih=683&q=" & TextBox1.Text)
End Sub
Private Sub WebBrowser1_DocumentCompleted(ByVal sender As System.Object, ByVal e As System.Windows.Forms.WebBrowserDocumentCompletedEventArgs) Handles WebBrowser1.DocumentCompleted
If (WebBrowser1.ReadyState = WebBrowserReadyState.Complete) Then
For Each ClientControl As HtmlElement In WebBrowser1.Document.Links
If Not ClientControl.GetAttribute("href").Contains("google") And ClientControl.GetAttribute("href").Contains("http") Then
ListBox1.Items.Add(ClientControl.GetAttribute("href"))
End If
Next
End If
End sub
So the question would be how i can make it work automatically using timer,multi threading,backgroundworker for loop, for i = 0 to,do untill or do while i'm new ?
here is that i want.
http://img193.imageshack.us/img193/453/howtoy.png