Dim TblCtl As New Windows.Forms.TableLayoutPanel
e.Form.BaseForm.MinimumSize = New Size(570, 350)
e.Form.StopRedraw
With TblCtl
.Name = "TblCtl"
.RowCount = 7
.ColumnCount = 4
.Anchor = Windows.Forms.AnchorStyles.Left Or _
Windows.Forms.AnchorStyles.Top _
Or Windows.Forms.AnchorStyles.Right _
Or Windows.Forms.AnchorStyles.Bottom
.Location = New Point(30, 30)
.Size = New Size(510, 240)
.BackColor = System.Drawing.Color.Transparent
.CellBorderStyle = Windows.Forms.TableLayoutPanelCellBorderStyle.Single
.Gettype.GetProperty("DoubleBuffered", Reflection.BindingFlags.Instance Or System.Reflection.BindingFlags.NonPublic).SetValue(TblCtl, True, Nothing)
.ColumnStyles.Add(New Windows.Forms.ColumnStyle(Windows.Forms.SizeType.Absolute, 80))
.ColumnStyles.Add(New Windows.Forms.ColumnStyle(Windows.Forms.SizeType.Percent, 50))
.ColumnStyles.Add(New Windows.Forms.ColumnStyle(Windows.Forms.SizeType.Absolute, 80))
.ColumnStyles.Add(New Windows.Forms.ColumnStyle(Windows.Forms.SizeType.Percent, 50))
.RowStyles.Add(New Windows.Forms.RowStyle(Windows.Forms.SizeType.Absolute, 28))
.RowStyles.Add(New Windows.Forms.RowStyle(Windows.Forms.SizeType.Absolute, 28))
.RowStyles.Add(New Windows.Forms.RowStyle(Windows.Forms.SizeType.Absolute, 28))
.RowStyles.Add(New Windows.Forms.RowStyle(Windows.Forms.SizeType.Absolute, 28))
.RowStyles.Add(New Windows.Forms.RowStyle(Windows.Forms.SizeType.Absolute, 28))
.RowStyles.Add(New Windows.Forms.RowStyle(Windows.Forms.SizeType.Percent, 100))
.RowStyles.Add(New Windows.Forms.RowStyle(Windows.Forms.SizeType.Absolute, 28))
For i As Integer = 0 To 6
.Controls.Add(e.Form.Controls("Label0" & i).BaseControl , 0 , i)
.Controls.Add(e.Form.Controls("Txt0" & i).BaseControl , 1 , i)
Next
For i As Integer = 0 To 3
.Controls.Add(e.Form.Controls("Label2" & i).BaseControl , 2 , i)
.Controls.Add(e.Form.Controls("Txt2" & i).BaseControl , 3 , i)
Next
.Controls.Add(e.Form.Controls("Label26").BaseControl , 2 , 6)
.Controls.Add(e.Form.Controls("Txt26").BaseControl , 3 , 6)
End With
e.Form.Panel.Controls.Add(TblCtl)
TblCtl.SetColumnSpan(e.Form.Controls("Txt05").BaseControl,3)
e.Form.ResumeRedraw