I want to add a u开发者_开发知识库sercontrol to a panel. My code does not work:
Panel1.Controls.Add(uc1)
You need to use an instance of the class:
Dim usrCntl as New uc1
Panel1.Controls.Add(userCntl)
But you will also have to define the properties correctly for it to view correctly.
Try using the Visual Studio IDE to place the cotrol--this will take a lot of work out of the effort.
精彩评论