我正在尝试通过Windows窗体VB中的代码创建一个tableLayoutPanel,稍后可以对其进行编码,以便通过编码添加额外的行和列
答案 0 :(得分:0)
表单开始时:
Private Sub form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles _MyBase.Load
Dim TLP As New TableLayoutPanel
'Edit all your properties: name, size, location, etc.
End Sub
当你点击button1时说:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Me.Controls.Add(TLP)
End Sub
希望有所帮助。