e.Form.panel.parent.parent.Width = 270 '设定窗口的宽度
e.Form.Text = CurrentTable.Name & "_ 菜单"
'Dim CheckBox1 As WinForm.GroupBox
Dim GBox As WinForm.GroupBox
Dim Value As String = "新增明细|新增报价|新增楼层|新增区域"
Dim sps() As Char = {"|"}
Dim Names() As String = Value.Split(sps)
Dim s As Integer = 2
Dim t As Integer = 5
For i As Integer = 0 To Names.length - 1
If i <> 0 Then
If i Mod 1 = 0 Then
s = 2
t = t + 200.5 '高度换算
Else
s = s + 261.5 '宽度换算
End If
End If
Dim nm As String = Names(i)
GBox = e.Form.CreateControl(nm, ControlTypeEnum.GroupBox)
GBox.Theme = "(none)" '去掉原来的样式
' zcdd.Font = New Font("宋体", 13, FontStyle.Bold)
GBox.Text = nm
GBox.name = nm
GBox.Width = 261
GBox.Height = 200
GBox.BackColor = Color.Transparent '透明背景色
GBox.ForeColor = Color.FromARGB(255, 255, 255)
GBox.Left = s + 8
GBox.Top = t + 2
e.Form.AddControl(GBox)
Next
Dim zcdd As WinForm.Button
'If dr("窗口按键_菜单") < > Nothing Then
Dim Value1 As String = "新增明|新增报|新增楼|新增区"
' Dim sps() As Char = {"|"}
Dim Names1() As String = Value1.Split(sps)
'Dim s As Integer = 2
'Dim t As Integer = 5
For i As Integer = 0 To Names1.length - 1
If i <> 0 Then
If i Mod 3 = 0 Then
s = 2
t = t + 50
Else
s = s + 66.5
End If
End If
Dim nm As String = Names1(i)
zcdd = e.Form.CreateControl(nm, ControlTypeEnum.Button)
zcdd.Theme = "(none)" '去掉原来的样式
zcdd.Font = New Font("宋体", 9, FontStyle.Bold)
zcdd.Text = nm
zcdd.name = nm & 1
zcdd.Width = 65
zcdd.Height = 49
zcdd.Left = s + 8
zcdd.Top = t + 2
zcdd.BorderSize = 0
zcdd.BackMost = False
' Forms("主窗_菜单").Controls("菜单页面").Tabpages("功能操作").AddControl(zcdd)
' e.Form.AddControl(zcdd)
e.Form.Controls("新增明细").AddControl(zcdd)
Next
改了也是不行