Loop thru listview
Posted: Sat Jun 02, 2012 6:05 pm
I have this code, it checks if a proxy ip is dead or alive, but i want it to loop thru my listview to see if every ip in the list is dead or alive and then add ex, "Alive" to a subitem in the listview
my code is
my code is
Code: Select all
This code is inside an backgroundworker to make my program lag less Dim ip As String = TextBox3.Text
Dim port As String = TextBox4.Text
Button9.Enabled = True
Button1.Enabled = False
If TextBox2.Text > "" Then
ElseIf TextBox2.Text < "" Then
label3.Text = "Please wait a moment"
Try
Dim siteUri As New System.Uri("http://www.google.dk")
Dim webRequest As System.Net.WebRequest = System.Net.WebRequest.Create(siteUri)
webRequest.Proxy = New System.Net.WebProxy(ip & ":" & port)
Dim webResponse As System.Net.WebResponse = webRequest.GetResponse()
label3.Text = ip & ":" & port & " Is active"
Catch ex As Exception
label3.Text = ip & ":" & port & " Is Inactive"
End Try
End If
Button1.Enabled = True
Button9.Enabled = False