Dynamically loaded controls

  • Thread starter Thread starter Arne Garvander
  • Start date Start date
A

Arne Garvander

How can I dynamically load controls unto a windows form?
I need to write some custom controls that are a composite of other controls.
These custom controls needs to be dynamically loaded into a container, maybe
a panel.
I know this can easily be done in Asp.net. Now I need to duplicate this
trick in windows .net 2.0.
 
Arne Garvander said:
How can I dynamically load controls unto a windows form?

\\\
Dim NewButton As New Button()
NewButton.Text = "Hello World"
....
Me.Controls.Add(NewButton)
///
I need to write some custom controls that are a composite of other
controls.

Take a look at user controls ("Project" -> "Add new element..." -> "User
control".
 
Back
Top