老师,我想把net表格布局控件摆在Panel3面板中,谢谢老师。
Dim TblCt2 As New Windows.Forms.TableLayoutPanel
e.Form.StopRedraw
With TblCt2
.Name = "TblCt2"
.RowCount = 3
.ColumnCount =3
.Anchor = Windows.Forms.AnchorStyles.Left Or _
Windows.Forms.AnchorStyles.Top _
Or Windows.Forms.AnchorStyles.Right _
Or Windows.Forms.AnchorStyles.Bottom
.Location = New Point(0, 0)
.Size = New Size(300, 100)
.BackColor = System.Drawing.Color.Transparent
.CellBorderStyle = Windows.Forms.TableLayoutPanelCellBorderStyle.Single
.Gettype.GetProperty("DoubleBuffered", Reflection.BindingFlags.Instance Or System.Reflection.BindingFlags.NonPublic).SetValue(TblCt2, True, Nothing)
.ColumnStyles.Add(New Windows.Forms.ColumnStyle(Windows.Forms.SizeType.Absolute, 86)) .ColumnStyles.Add(New Windows.Forms.ColumnStyle(Windows.Forms.SizeType.Absolute, 100)) .ColumnStyles.Add(New Windows.Forms.ColumnStyle(Windows.Forms.SizeType.Absolute, 65)) '
.RowStyles.Add(New Windows.Forms.RowStyle(Windows.Forms.SizeType.Absolute, 31)) '1
.RowStyles.Add(New Windows.Forms.RowStyle(Windows.Forms.SizeType.Absolute, 31)) '2
.RowStyles.Add(New Windows.Forms.RowStyle(Windows.Forms.SizeType.Absolute, 31)) '3
[此贴子已经被作者于2023/11/19 7:33:59编辑过]