窗口的afterload代码,没有加黑处的代码时,可以打开;反之,运行虽然不报错,但在主窗口内打不开窗口。单独打开此窗口可以。:
AddHandler e.Form.Panel.MouseDown,AddressOf Panel_MouseDown '无边框移动
e.form.BaseForm.FormBorderStyle = Windows.Forms.FormBorderStyle.None
e.Form.BaseForm.ShowInTaskbar = True
e.form.Controls("TextBox2").basecontrol.SendToBack '置后
e.Form.BaseForm.height = 580 '独立窗口用此
e.Form.Controls("SplitContainer1").Panel2.Collapsed = True
Tables("流程管理_Table1").grid.styles.Normal.Border.Color = Color.Red '窗口表样式
Tables("流程管理_Table1").grid.styles.Normal.Border.Style = 1
Tables("流程管理_Table1").grid.styles.Normal.Border.width = 1
Tables("流程管理_Table1").grid.styles.Normal.Border.Direction = 0 '0-2
Tables("流程管理_Table1").DefaultRowHeight = 30
Tables("流程管理_Table1").AutoSizeRows
Tables("流程管理_Table1").AutoSizeHeaderRow
Tables("流程管理_Table2").grid.styles.Normal.Border.Color = Color.Red '窗口表样式
Tables("流程管理_Table2").grid.styles.Normal.Border.Style = 1
Tables("流程管理_Table2").grid.styles.Normal.Border.width = 1
Tables("流程管理_Table2").grid.styles.Normal.Border.Direction = 0 '0-2
Tables("流程管理_Table2").DefaultRowHeight = 30
Tables("流程管理_Table2").AutoSizeRows
Tables("流程管理_Table2").AutoSizeHeaderRow '自动列表题
With Tables("流程管理_Table2") '合并单元格
.MergeMode = MergeModeEnum.Standard
.MergeCols.Clear()
.MergeCols.Add("案号")
.MergeCols.Add("原告")
.MergeCols.Add("第三人")
.MergeSort = "案号"
.MergeSort = "原告"
.MergeSort = "第三人"
.AllowMerge = True
End With
msgbox(1)
e.Form.Controls("Table1").Table.Grid.AllowFiltering = True '表头筛选
e.Form.Controls("TextBox1").Text = "请输入案号数字" '文本框提示
msgbox(2)
Dim Filter As String
Tables("流程管理_Table1").Filter = Filter
msgbox(3)
Dim trv As WinForm.TreeView = e.Form.Controls("TreeView1")
trv.BuildTree(e.Form.Controls("Table1").Table.DataTable, "承办人|是否结案|审判程序",Filter) '窗口中副本表的筛选树
trv.Nodes.Insert("显示所有行",0)
msgbox(4)
msgbox(5)
Dim rgd1 As WinForm.RecordGrid = e.Form.Controls("RecordGrid1")
rgd1.Table = Tables("流程管理_Table1") '指定绑定表
rgd1.Columns = "案号|立案日期|当事人|案由|自定义案由|行政机关|行政行为|是否经过复议|承办人|是否结案|审理天数|二审上诉_上诉日期|归档_归档日期"
rgd1.Build() '重新生成记录窗口
msgbox(6)
Dim rgd2 As WinForm.RecordGrid = e.Form.Controls("RecordGrid2")
rgd2.Table = Tables("流程管理_Table1") '指定绑定表
rgd2.Columns = "案号|承办人|审判长|其他合议庭成员|陪审员|法官助理|书记员|开庭排期_开庭时间|开庭排期_开庭地点|开庭排期_开庭次数|开庭排期_合并审理"
rgd2.Build() '重新生成记录窗口
msgbox(7)
Dim rgd3 As WinForm.RecordGrid = e.Form.Controls("RecordGrid3")
rgd3.Table = Tables("流程管理_Table1") '指定绑定表
rgd3.Columns = "案号|结案方式|裁判类型|结案日期|行政机关败诉|诉讼费减缓免|是否需要退费|退费日期|是否退费"
rgd3.Build() '重新生成记录窗口
msgbox(8)
Dim rgd5 As WinForm.RecordGrid = e.Form.Controls("RecordGrid5")
rgd5.Table = Tables("流程管理_Table1") '指定绑定表
rgd5.Columns = "案号|当事人|承办人|归档_归档日期|归档_是否归档|归档_卷宗册数|归档_正卷页数|归档_副卷页数"
rgd5.Build() '重新生成记录窗口
msgbox(9)
Dim g1 = e.Form.Controls("RecordGrid1").BaseControl
g1.Styles.normal.Border.Style = 1
g1.styles.Normal.Border.Color = Color.red
g1.styles.Normal.Border.width = 1
For Each r As object In g1.Rows
r.Height = 36
Next
msgbox(10)
Dim g2 = e.Form.Controls("RecordGrid2").BaseControl
g2.Styles.normal.Border.Style = 1
g2.styles.Normal.Border.Color = Color.red
g2.styles.Normal.Border.width = 1
For Each r As object In g2.Rows
r.Height = 42
Next
msgbox(11)
Dim g3 = e.Form.Controls("RecordGrid3").BaseControl
g3.Styles.normal.Border.Style = 1
g3.styles.Normal.Border.Color = Color.red
g3.styles.Normal.Border.width = 1
'g3.AutoSizeRows
For Each r As object In g3.Rows
r.Height = 50
Next
g3.Rows(0).Height = 50
msgbox(12)
Dim g5 = e.Form.Controls("RecordGrid5").BaseControl
g5.Styles.normal.Border.Style = 1
g5.styles.Normal.Border.Color = Color.red
g5.styles.Normal.Border.width = 1
'g5.AutoSizeRows
For Each r As object In g5.Rows
r.Height = 52
Next
[此贴子已经被作者于2017/10/23 16:57:29编辑过]