Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
.NET 4.5.1 and Visual Studio 2013 General Discussions For discussing anything about .NET 4.5.1, WPF, WCF, the rest of the .NET 4.5.1 Framework, and Visual Studio 2013 that isn't about a specific Wrox book. Please post code questions about a specific language (C#, VB, ASP.NET, etc) in the correct language forum instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the .NET 4.5.1 and Visual Studio 2013 General Discussions section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
 
 
Thread Tools Display Modes
  #1 (permalink)  
Old August 30th, 2014, 10:42 AM
Registered User
Points: 10, Level: 1
Points: 10, Level: 1 Points: 10, Level: 1 Points: 10, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Aug 2014
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default multi threading in http web request

hello every one i have made a proxy checker which sends http web request and checks the proxy weather it responds in a certain time or not i have employed a background worker on it. but i wanna know is it possible to use multiple threads in same process if yes then how to control them using timer

here is the source code of my app

Imports System
Imports System.IO
Imports System.Net
Imports System.Threading.Thread
Imports System.Collections

Public Class Form1

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
CheckForIllegalCrossThreadCalls = False
TrackBar1.Maximum = 10
TrackBar1.Minimum = 1
TrackBar1.SmallChange = 1
Label1.Text = TrackBar1.Value
ComboBox1.Items.Add("0")
ComboBox1.Items.Add("1")
ComboBox1.Items.Add("2")
ComboBox1.Items.Add("3")
ComboBox1.Items.Add("4")
ComboBox1.Items.Add("5")
ComboBox1.Items.Add("6")
Label3.Text = ListBox1.Items.Count()
Label2.Text = ListBox1.Items.Count()
Label5.Text = ListBox2.Items.Count()
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
listbox1.items.Clear()
ListBox2.Items.Clear()
Dim fo As New OpenFileDialog
fo.RestoreDirectory = True
fo.Multiselect = True
fo.Filter = "txt files (*.txt)|*.txt"
fo.FilterIndex = 1
fo.ShowDialog()
If Not (fo.FileName = Nothing) Then
Using sr As New StreamReader(fo.FileName)
While sr.Peek <> -1
CheckedListBox1.Items.Add(sr.ReadLine())
Label2.Text = CheckedListBox1.Items.Count()
If TextBox1.Text = "" Then
MsgBox("Enter Url First Then Select Proxies")
End
End If
End While
End Using
End If
End Sub

Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Dim fs As New SaveFileDialog
fs.RestoreDirectory = True
fs.Filter = "txt files (*.txt)|*.txt"
fs.FilterIndex = 1
fs.ShowDialog()
If Not (fs.FileName = Nothing) Then
Using sw As New StreamWriter(fs.FileName)
For Each line As String In ListBox2.Items
sw.WriteLine(line)
Next
End Using
End If
End Sub

Private Sub TrackBar1_Scroll(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TrackBar1.Scroll
Label1.Text = TrackBar1.Value
End Sub

Private Sub BackgroundWorker1_DoWork(ByVal sender As System.Object, ByVal e As System.ComponentModel.DoWorkEventArgs) Handles BackgroundWorker1.DoWork

Dim myProxy As WebProxy
For Each line As String In CheckedListBox1.Items
Try
myProxy = New WebProxy(line)
Dim r As HttpWebRequest = HttpWebRequest.Create(TextBox1.Text)
r.UserAgent = "Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/29.0.1547.2 Safari/537.36"
r.Timeout = TrackBar1.Value * 1000
r.Proxy = myProxy
Dim re As HttpWebResponse = r.GetResponse()
ListBox1.Items.Add("" & line)
Catch ex As Exception
ListBox2.Items.Add("not working" & line)
Label5.Text = ListBox2.Items.Count()
End Try
Sleep(ComboBox1.Text * 1000)
Next
End Sub


Private Sub BackgroundWorker1_RunWorkerCompleted(ByVal sender As Object, ByVal e As System.ComponentModel.RunWorkerCompletedEventArgs) Handles BackgroundWorker1.RunWorkerCompleted
MsgBox(" work completed ")

End Sub

Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click
BackgroundWorker1.Dispose()
BackgroundWorker1.CancelAsync()
End Sub

Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
SyncLock (BackgroundWorker1)
End SyncLock
SyncLock (BackgroundWorker2)
End SyncLock
SyncLock (BackgroundWorker3)
End SyncLock
SyncLock (BackgroundWorker4)
End SyncLock
SyncLock (BackgroundWorker5)
End SyncLock
SyncLock (BackgroundWorker5)
End SyncLock
SyncLock (BackgroundWorker6)
End SyncLock
SyncLock (BackgroundWorker7)
End SyncLock
SyncLock (BackgroundWorker8)
End SyncLock
SyncLock (BackgroundWorker9)
End SyncLock
SyncLock (BackgroundWorker10)
End SyncLock
SyncLock (BackgroundWorker11)
End SyncLock
SyncLock (BackgroundWorker12)
End SyncLock
SyncLock (BackgroundWorker13)
End SyncLock
SyncLock (BackgroundWorker14)
End SyncLock
SyncLock (BackgroundWorker15)
End SyncLock
SyncLock (BackgroundWorker16)
End SyncLock
SyncLock (BackgroundWorker17)
End SyncLock
SyncLock (BackgroundWorker18)
End SyncLock
SyncLock (BackgroundWorker19)
End SyncLock
SyncLock (BackgroundWorker20)
End SyncLock
End Sub

Private Sub BackgroundWorker2_DoWork(ByVal sender As System.Object, ByVal e As System.ComponentModel.DoWorkEventArgs) Handles BackgroundWorker2.DoWork
Dim myProxy As WebProxy
For Each line As String In CheckedListBox1.Items
Try
myProxy = New WebProxy(line)
Dim r As HttpWebRequest = HttpWebRequest.Create(TextBox1.Text)
r.UserAgent = "Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/29.0.1547.2 Safari/537.36"
r.Timeout = TrackBar1.Value * 1000
r.Proxy = myProxy
Dim re As HttpWebResponse = r.GetResponse()
ListBox1.Items.Add("" & line)
Catch ex As Exception
ListBox2.Items.Add("not working" & line)
Label5.Text = ListBox2.Items.Count()
End Try
Sleep(ComboBox1.Text * 1000)
Next
End Sub

Private Sub BackgroundWorker3_DoWork(ByVal sender As System.Object, ByVal e As System.ComponentModel.DoWorkEventArgs) Handles BackgroundWorker3.DoWork
Dim myProxy As WebProxy
For Each line As String In CheckedListBox1.Items
Try
myProxy = New WebProxy(line)
Dim r As HttpWebRequest = HttpWebRequest.Create(TextBox1.Text)
r.UserAgent = "Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/29.0.1547.2 Safari/537.36"
r.Timeout = TrackBar1.Value * 1000
r.Proxy = myProxy
Dim re As HttpWebResponse = r.GetResponse()
ListBox1.Items.Add("" & line)
Catch ex As Exception
ListBox2.Items.Add("not working" & line)
Label5.Text = ListBox2.Items.Count()
End Try
Sleep(ComboBox1.Text * 1000)
Next
End Sub

Private Sub BackgroundWorker4_DoWork(ByVal sender As System.Object, ByVal e As System.ComponentModel.DoWorkEventArgs) Handles BackgroundWorker4.DoWork
Dim myProxy As WebProxy
For Each line As String In CheckedListBox1.Items
Try
myProxy = New WebProxy(line)
Dim r As HttpWebRequest = HttpWebRequest.Create(TextBox1.Text)
r.UserAgent = "Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/29.0.1547.2 Safari/537.36"
r.Timeout = TrackBar1.Value * 1000
r.Proxy = myProxy
Dim re As HttpWebResponse = r.GetResponse()
ListBox1.Items.Add("" & line)
Catch ex As Exception
ListBox2.Items.Add("not working" & line)
Label5.Text = ListBox2.Items.Count()
End Try
Sleep(ComboBox1.Text * 1000)
Next
End Sub

Private Sub BackgroundWorker5_DoWork(ByVal sender As System.Object, ByVal e As System.ComponentModel.DoWorkEventArgs) Handles BackgroundWorker5.DoWork
Dim myProxy As WebProxy
For Each line As String In CheckedListBox1.Items
Try
myProxy = New WebProxy(line)
Dim r As HttpWebRequest = HttpWebRequest.Create(TextBox1.Text)
r.UserAgent = "Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/29.0.1547.2 Safari/537.36"
r.Timeout = TrackBar1.Value * 1000
r.Proxy = myProxy
Dim re As HttpWebResponse = r.GetResponse()
ListBox1.Items.Add("" & line)
Catch ex As Exception
ListBox2.Items.Add("not working" & line)
Label5.Text = ListBox2.Items.Count()
End Try
Sleep(ComboBox1.Text * 1000)
Next
End Sub

Private Sub BackgroundWorker6_DoWork(ByVal sender As System.Object, ByVal e As System.ComponentModel.DoWorkEventArgs) Handles BackgroundWorker6.DoWork
Dim myProxy As WebProxy
For Each line As String In CheckedListBox1.Items
Try
myProxy = New WebProxy(line)
Dim r As HttpWebRequest = HttpWebRequest.Create(TextBox1.Text)
r.UserAgent = "Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/29.0.1547.2 Safari/537.36"
r.Timeout = TrackBar1.Value * 1000
r.Proxy = myProxy
Dim re As HttpWebResponse = r.GetResponse()
ListBox1.Items.Add("" & line)
Catch ex As Exception
ListBox2.Items.Add("not working" & line)
Label5.Text = ListBox2.Items.Count()
End Try
Sleep(ComboBox1.Text * 1000)
Next
End Sub

Private Sub BackgroundWorker7_DoWork(ByVal sender As System.Object, ByVal e As System.ComponentModel.DoWorkEventArgs) Handles BackgroundWorker7.DoWork
Dim myProxy As WebProxy
For Each line As String In CheckedListBox1.Items
Try
myProxy = New WebProxy(line)
Dim r As HttpWebRequest = HttpWebRequest.Create(TextBox1.Text)
r.UserAgent = "Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/29.0.1547.2 Safari/537.36"
r.Timeout = TrackBar1.Value * 1000
r.Proxy = myProxy
Dim re As HttpWebResponse = r.GetResponse()
ListBox1.Items.Add("" & line)
Catch ex As Exception
ListBox2.Items.Add("not working" & line)
Label5.Text = ListBox2.Items.Count()
End Try
Sleep(ComboBox1.Text * 1000)
Next
End Sub

Private Sub BackgroundWorker8_DoWork(ByVal sender As System.Object, ByVal e As System.ComponentModel.DoWorkEventArgs) Handles BackgroundWorker8.DoWork
Dim myProxy As WebProxy
For Each line As String In CheckedListBox1.Items
Try
myProxy = New WebProxy(line)
Dim r As HttpWebRequest = HttpWebRequest.Create(TextBox1.Text)
r.UserAgent = "Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/29.0.1547.2 Safari/537.36"
r.Timeout = TrackBar1.Value * 1000
r.Proxy = myProxy
Dim re As HttpWebResponse = r.GetResponse()
ListBox1.Items.Add("" & line)
Catch ex As Exception
ListBox2.Items.Add("not working" & line)
Label5.Text = ListBox2.Items.Count()
End Try
Sleep(ComboBox1.Text * 1000)
Next
End Sub

Private Sub BackgroundWorker9_DoWork(ByVal sender As System.Object, ByVal e As System.ComponentModel.DoWorkEventArgs) Handles BackgroundWorker9.DoWork
Dim myProxy As WebProxy
For Each line As String In CheckedListBox1.Items
Try
myProxy = New WebProxy(line)
Dim r As HttpWebRequest = HttpWebRequest.Create(TextBox1.Text)
r.UserAgent = "Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/29.0.1547.2 Safari/537.36"
r.Timeout = TrackBar1.Value * 1000
r.Proxy = myProxy
Dim re As HttpWebResponse = r.GetResponse()
ListBox1.Items.Add("" & line)
Catch ex As Exception
ListBox2.Items.Add("not working" & line)
Label5.Text = ListBox2.Items.Count()
End Try
Sleep(ComboBox1.Text * 1000)
Next
End Sub

Private Sub BackgroundWorker10_DoWork(ByVal sender As System.Object, ByVal e As System.ComponentModel.DoWorkEventArgs) Handles BackgroundWorker10.DoWork
Dim myProxy As WebProxy
For Each line As String In CheckedListBox1.Items
Try
myProxy = New WebProxy(line)
Dim r As HttpWebRequest = HttpWebRequest.Create(TextBox1.Text)
r.UserAgent = "Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/29.0.1547.2 Safari/537.36"
r.Timeout = TrackBar1.Value * 1000
r.Proxy = myProxy
Dim re As HttpWebResponse = r.GetResponse()
ListBox1.Items.Add("" & line)
Catch ex As Exception
ListBox2.Items.Add("not working" & line)
Label5.Text = ListBox2.Items.Count()
End Try
Sleep(ComboBox1.Text * 1000)
Next
End Sub

Private Sub BackgroundWorker11_DoWork(ByVal sender As System.Object, ByVal e As System.ComponentModel.DoWorkEventArgs) Handles BackgroundWorker11.DoWork
Dim myProxy As WebProxy
For Each line As String In CheckedListBox1.Items
Try
myProxy = New WebProxy(line)
Dim r As HttpWebRequest = HttpWebRequest.Create(TextBox1.Text)
r.UserAgent = "Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/29.0.1547.2 Safari/537.36"
r.Timeout = TrackBar1.Value * 1000
r.Proxy = myProxy
Dim re As HttpWebResponse = r.GetResponse()
ListBox1.Items.Add("" & line)
Catch ex As Exception
ListBox2.Items.Add("not working" & line)
Label5.Text = ListBox2.Items.Count()
End Try
Sleep(ComboBox1.Text * 1000)
Next
End Sub

Private Sub BackgroundWorker12_DoWork(ByVal sender As System.Object, ByVal e As System.ComponentModel.DoWorkEventArgs) Handles BackgroundWorker12.DoWork
Dim myProxy As WebProxy
For Each line As String In CheckedListBox1.Items
Try
myProxy = New WebProxy(line)
Dim r As HttpWebRequest = HttpWebRequest.Create(TextBox1.Text)
r.UserAgent = "Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/29.0.1547.2 Safari/537.36"
r.Timeout = TrackBar1.Value * 1000
r.Proxy = myProxy
Dim re As HttpWebResponse = r.GetResponse()
ListBox1.Items.Add("" & line)
Catch ex As Exception
ListBox2.Items.Add("not working" & line)
Label5.Text = ListBox2.Items.Count()
End Try
Sleep(ComboBox1.Text * 1000)
Next
End Sub

Private Sub BackgroundWorker13_DoWork(ByVal sender As System.Object, ByVal e As System.ComponentModel.DoWorkEventArgs) Handles BackgroundWorker13.DoWork
Dim myProxy As WebProxy
For Each line As String In CheckedListBox1.Items
Try
myProxy = New WebProxy(line)
Dim r As HttpWebRequest = HttpWebRequest.Create(TextBox1.Text)
r.UserAgent = "Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/29.0.1547.2 Safari/537.36"
r.Timeout = TrackBar1.Value * 1000
r.Proxy = myProxy
Dim re As HttpWebResponse = r.GetResponse()
ListBox1.Items.Add("" & line)
Catch ex As Exception
ListBox2.Items.Add("not working" & line)
Label5.Text = ListBox2.Items.Count()
End Try
Sleep(ComboBox1.Text * 1000)
Next
End Sub

Private Sub BackgroundWorker14_DoWork(ByVal sender As System.Object, ByVal e As System.ComponentModel.DoWorkEventArgs) Handles BackgroundWorker14.DoWork
Dim myProxy As WebProxy
For Each line As String In CheckedListBox1.Items
Try
myProxy = New WebProxy(line)
Dim r As HttpWebRequest = HttpWebRequest.Create(TextBox1.Text)
r.UserAgent = "Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/29.0.1547.2 Safari/537.36"
r.Timeout = TrackBar1.Value * 1000
r.Proxy = myProxy
Dim re As HttpWebResponse = r.GetResponse()
ListBox1.Items.Add("" & line)
Catch ex As Exception
ListBox2.Items.Add("not working" & line)
Label5.Text = ListBox2.Items.Count()
End Try
Sleep(ComboBox1.Text * 1000)
Next
End Sub

Private Sub BackgroundWorker15_DoWork(ByVal sender As System.Object, ByVal e As System.ComponentModel.DoWorkEventArgs) Handles BackgroundWorker15.DoWork
Dim myProxy As WebProxy
For Each line As String In CheckedListBox1.Items
Try
myProxy = New WebProxy(line)
Dim r As HttpWebRequest = HttpWebRequest.Create(TextBox1.Text)
r.UserAgent = "Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/29.0.1547.2 Safari/537.36"
r.Timeout = TrackBar1.Value * 1000
r.Proxy = myProxy
Dim re As HttpWebResponse = r.GetResponse()
ListBox1.Items.Add("" & line)
Catch ex As Exception
ListBox2.Items.Add("not working" & line)
Label5.Text = ListBox2.Items.Count()
End Try
Sleep(ComboBox1.Text * 1000)
Next
End Sub

Private Sub BackgroundWorker16_DoWork(ByVal sender As System.Object, ByVal e As System.ComponentModel.DoWorkEventArgs) Handles BackgroundWorker16.DoWork
Dim myProxy As WebProxy
For Each line As String In CheckedListBox1.Items
Try
myProxy = New WebProxy(line)
Dim r As HttpWebRequest = HttpWebRequest.Create(TextBox1.Text)
r.UserAgent = "Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/29.0.1547.2 Safari/537.36"
r.Timeout = TrackBar1.Value * 1000
r.Proxy = myProxy
Dim re As HttpWebResponse = r.GetResponse()
ListBox1.Items.Add("" & line)
Catch ex As Exception
ListBox2.Items.Add("not working" & line)
Label5.Text = ListBox2.Items.Count()
End Try
Sleep(ComboBox1.Text * 1000)
Next
End Sub

Private Sub BackgroundWorker17_DoWork(ByVal sender As System.Object, ByVal e As System.ComponentModel.DoWorkEventArgs) Handles BackgroundWorker17.DoWork
Dim myProxy As WebProxy
For Each line As String In CheckedListBox1.Items
Try
myProxy = New WebProxy(line)
Dim r As HttpWebRequest = HttpWebRequest.Create(TextBox1.Text)
r.UserAgent = "Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/29.0.1547.2 Safari/537.36"
r.Timeout = TrackBar1.Value * 1000
r.Proxy = myProxy
Dim re As HttpWebResponse = r.GetResponse()
ListBox1.Items.Add("" & line)
Catch ex As Exception
ListBox2.Items.Add("not working" & line)
Label5.Text = ListBox2.Items.Count()
End Try
Sleep(ComboBox1.Text * 1000)
Next
End Sub

Private Sub BackgroundWorker18_DoWork(ByVal sender As System.Object, ByVal e As System.ComponentModel.DoWorkEventArgs) Handles BackgroundWorker18.DoWork
Dim myProxy As WebProxy
For Each line As String In CheckedListBox1.Items
Try
myProxy = New WebProxy(line)
Dim r As HttpWebRequest = HttpWebRequest.Create(TextBox1.Text)
r.UserAgent = "Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/29.0.1547.2 Safari/537.36"
r.Timeout = TrackBar1.Value * 1000
r.Proxy = myProxy
Dim re As HttpWebResponse = r.GetResponse()
ListBox1.Items.Add("" & line)
Catch ex As Exception
ListBox2.Items.Add("not working" & line)
Label5.Text = ListBox2.Items.Count()
End Try
Sleep(ComboBox1.Text * 1000)
Next
End Sub

Private Sub BackgroundWorker19_DoWork(ByVal sender As System.Object, ByVal e As System.ComponentModel.DoWorkEventArgs) Handles BackgroundWorker19.DoWork
Dim myProxy As WebProxy
For Each line As String In CheckedListBox1.Items
Try
myProxy = New WebProxy(line)
Dim r As HttpWebRequest = HttpWebRequest.Create(TextBox1.Text)
r.UserAgent = "Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/29.0.1547.2 Safari/537.36"
r.Timeout = TrackBar1.Value * 1000
r.Proxy = myProxy
Dim re As HttpWebResponse = r.GetResponse()
ListBox1.Items.Add("" & line)
Catch ex As Exception
ListBox2.Items.Add("not working" & line)
Label5.Text = ListBox2.Items.Count()
End Try
Sleep(ComboBox1.Text * 1000)
Next
End Sub

Private Sub BackgroundWorker20_DoWork(ByVal sender As System.Object, ByVal e As System.ComponentModel.DoWorkEventArgs) Handles BackgroundWorker20.DoWork
Dim myProxy As WebProxy
For Each line As String In CheckedListBox1.Items
Try
myProxy = New WebProxy(line)
Dim r As HttpWebRequest = HttpWebRequest.Create(TextBox1.Text)
r.UserAgent = "Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/29.0.1547.2 Safari/537.36"
r.Timeout = TrackBar1.Value * 1000
r.Proxy = myProxy
Dim re As HttpWebResponse = r.GetResponse()
ListBox1.Items.Add("" & line)
Catch ex As Exception
ListBox2.Items.Add("not working" & line)
Label5.Text = ListBox2.Items.Count()
End Try
Sleep(ComboBox1.Text * 1000)
Next
End Sub
End Class
 


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Http web request Nadeem ASP.NET 2.0 Professional 5 October 27th, 2008 07:28 AM
Multi-Threading Issue jwebb Pro VB.NET 2002/2003 11 April 23rd, 2007 07:46 AM
Multi-threading issue Bill Crawley Pro Visual Basic 2005 0 March 21st, 2007 06:19 AM
multi threading rashid.shaban@gmail.com BOOK: ASP.NET Website Programming Problem-Design-Solution 1 February 26th, 2007 10:48 PM
Multi threading, web service requests sheel VS.NET 2002/2003 2 January 12th, 2007 03:39 AM



All times are GMT -4. The time now is 03:52 PM.


Powered by vBulletin®
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.