Thanks a lot, it works!!!
I've also noticed in vb. net that if I have a label
control on the form and then copy it on the same form I
don't have the option to create an array. Was this
possibility removed?
>-----Original Message-----
>>How can I declare in VB .NET an array of labels for
>>example and afterwards using a FOR structure load every
>>component of the array?
>
>Yes.
>
>
>>I've used this code but it doesn't work:
>>
>>dim x(10) as label
>>
>>for i=0 to 10
>> x(i)=new label
>> x(i).visible=true
>> x(i).show
>>next i
>
>You must also add the controls to the Controls
collection of the
>parent (probably your Form).
>
>Controls.Add(x(i))
>
>
>
>Mattias
>
>--
>Mattias Sjögren [MVP] mattias @ mvps.org
>http://www.msjogren.net/dotnet/ |
http://www.dotnetinterop.com
>Please reply only to the newsgroup.
>.
>