开发者

Add a usercontrol to a panel

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜