I did get the add controls command, but my problem is mainly that I need to
add a variable number of labels with not a fixed name
eg
I need 5 labels where 5 can be any number between 1 and 40 or so
I cant use dim l(5) as new label
with l
.Text = ...
...
End With
Me.Controls.Add(l(5))
So is there another easier way to do this?
"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:2o************@uni-berlin.de...
* "whaletyr" <wh******@wanadoo.nl> scripsit: I need to add several (a variable number of ) labels in runtime to my
form.
I am using VB2003 and i have searched for answers and i should change
the Index.
Index?
I cannot find where or how to do it, and I want to know what is the
easiest way to add labels or textboxes to a form in runtime.
\\\
Dim b As New Button()
With b
.Text = ...
...
End With
Me.Controls.Add(b)
.
.
.
Me.Controls.Remove(b)
///
--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>