So basically all i want to do is to go through all the websites with 5 seconds to view each page.
Create a Timer in the form. Set its interval to 5000 (for 5 seconds). Do not enable it. Then add the following code to the form. Modify it as needed:
[php]Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
ListBox2.SelectedIndex = 0
End Sub
Private Sub WebBrowser1_DocumentCompleted(ByVal sender As Object, ByVal e As System.Windows.Forms.WebBrowserDocumentCompletedEv entArgs) Handles WebBrowser1.DocumentCompleted
Application.DoEvents()
Timer1.Enabled = True
End Sub
Private Sub ListBox2_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ListBox2.SelectedIndexChanged
WebBrowser1.Navigate(ListBox2.SelectedItem)
End Sub
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
If Not ListBox2.SelectedIndex = ListBox2.Items.Count - 1 Then
ListBox2.SelectedIndex += 1
Timer1.Enabled = False
End If
End Sub[/php]
This will navigate through a site, and when the site has completely loaded, waits for 5 seconds and then moves to the next website (Listbox Item).
Hope this helps !!
[php]
Listbox2.selectedindex = 0
For i As Integer = 0 To ListBox2.Items.Count - 1
Dim NewItem as integer = 0
listbox2.selectedindex = NewItem
WebBrowser1.Navigate(listbox2.selecteditem())
newItem = Newitem + 1
Next
[/php]
Should work, I guess.