Thats a lot of good info, but where it ultimately got me is use the synclock function, which i tried with no luck at all.
VB Code:
Public Class MainClass Private Threads(256) As Threading.Thread Private PingObjects(256) As PingClass Private Sub MySub() For I As Integer = 0 To 255 PingObjects(I) = New PingClass Threads(I) = New Threading.Thread(AddressOf PingObjects(I).collect) Threads(I).IsBackground = True Threads(I).Start() Next End Sub End Class Public Class PingClass Public Sub collect() 'Ping Ips on subnet 'if IP is valid form1.listbox1.items.add(IP) 'DOES NOT WRITE even with synclock block around it End Sub End Class
How can I get sync lock to work appropriately for this (I have looked over its articles and tried to duplicate their examples several ways with no luck...)




Reply With Quote