|
-
Feb 22nd, 2002, 07:07 PM
#1
Thread Starter
PowerPoster
Control Arrays.
Hiho. I was reading in the .NET help file about the elimination of Control Arrays. Not a bad way to do it, but with the new system, I can't figure out how to do something I found easy in vb6:
Dynamically load and deal with controls. For example, in VB6:
VB Code:
Private Sub sckData_DataArrival(Index as Integer, bytesTotal as Long)
sckData(Index).Foo()
End Sub
Then unlimited connections could be handled. However, in VB.NET, I would need to do something like this:
VB Code:
Private Sub sckData_DataArrival(ByVal sender As Object, ByVal e As AxMSWinsockLib.DMSWinsockControlEvents_DataArrivalEvent) Handles sckData1.DataArrival, sckData2.DataArrival, sckData3.DataArrival '.....
sender.Foo()
End Sub
If I don't know how many controls I will have at runtime, how am I to handle their events?
Every passing hour brings the Solar System forty-three thousand miles closer to Globular Cluster M13 in Hercules -- and still there are some misfits who insist that there is no such thing as progress.
-
Feb 23rd, 2002, 01:11 PM
#2
Thread Starter
PowerPoster
Resolved :-)
VB Code:
AddHandler NewSocket.DataArrival, AddressOf sckMain_DataArrival
Every passing hour brings the Solar System forty-three thousand miles closer to Globular Cluster M13 in Hercules -- and still there are some misfits who insist that there is no such thing as progress.
-
Feb 27th, 2002, 02:02 PM
#3
Frenzied Member
I was wondering how to do this, too. Thanks.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|