Dynamically add a usercontrol in VB.net
问题 I have made a custom UserControl i Vb.net (windows application). How can I add this dynamically to a form? 回答1: A UserControl is essentially just another class. It inherits from Control, so you can do all kinds of things you do with controls, but otherwise it's just a class. Thus, to add the usercontrol dynamically to your form you'd do the following: Create a new instance of your control. Like Dim X As New MyControl() Add the control to your form as a child object to whatever container you