b.Content = "按钮1"
b.Height = 50
b.Width = 80
groupBox1.Content = b
如果需要添加多个,需要用到布局控件了stackpal等
实例代码://在picture1上面添加一个commandbuttonPrivateSubForm_Load()Form1.Controls.Add"VB.CommandButton","cmdOk",Picture1//动态添加控件WithForm1.cmdOk.Visible=True.Width=500.Caption="确认(&Y)"EndWithEndSub欢迎分享,转载请注明来源:内存溢出
评论列表(0条)