Does anyone knows how to create a control array in VB.NET?
If my eyes do not deceive me, there's no index property for a control. I also tried to do it dynamically in several ways, but all failed.

If I try to create an array of controls using the load function it fails, because it seems like (not sure) that the load function has a different meaning in .NET.
When I declare an array of controls, I can load them, but I cannot seem to place them on the form.

Dim Lbls(5)
Dim T as integer
for T=0 to 4
lbls(t) = new Label
lbls(t).Text = "Label " & T.ToString ' gotta love this notation
lbls(t).Location.X = 10
lbls(t).Location.Y = 20 + (T * 20)
next T



This fails on the lbls(t).Location.X = 10, saying I cannot assign to this expression.
Really beats me, anybody have a clue?


Tom Cannaerts
[email protected]

Programming today is a race between software engineers striving to build bigger and better idot-proof programs, and the universe trying to produce bigger and better idiots. So far, the universe is winning -- Rich Cook