Pronasao sam jedan zgodan primer za Winsock kontrolu (zgodan zato sto je kratak :) ) ali i dalje imam problem.
Code:
Dim MySocketArray As New ArrayList
Dim MySocketControl As SocketControl 'Lets say it is called just like that for this example
'Adds the first one to the collection
MySocketControl = New SocketControl
MySocketArray.Add(MySocketControl)
'Adds the second one to the collection
MySocketControl = New SocketControl
MySocketArray.Add(MySocketControl)
'To Read the first item back to SocketControl type again
MySocketControl = CType(MySocketArray(0), SocketControl)
'To go through the entire collection to find a particular Socket Control
For Each TempSocketControl As SocketControl In MySocketArray
'Do your code in here
Next
Dim MySocketArray As New ArrayList
Dim MySocketControl As SocketControl 'Lets say it is called just like that for this example
'Adds the first one to the collection
MySocketControl = New SocketControl
MySocketArray.Add(MySocketControl)
'Adds the second one to the collection
MySocketControl = New SocketControl
MySocketArray.Add(MySocketControl)
'To Read the first item back to SocketControl type again
MySocketControl = CType(MySocketArray(0), SocketControl)
'To go through the entire collection to find a particular Socket Control
For Each TempSocketControl As SocketControl In MySocketArray
'Do your code in here
Next
Da li je potrebno uvesti neku referencu za SocketControl jer on ne prepoznaje taj tip?