--
Tables("主窗口_table1").DefaultRowHeight = 30
e.form.baseform.windowstate = 2
Dim tv As WinForm.TreeView = e.Form.Controls("TreeView2")
Dim tv1 As WinForm.TreeView = e.Form.Controls("TreeView3")
Dim tv4 As WinForm.TreeView = e.Form.Controls("TreeView4")
Dim tv5 As WinForm.TreeView = e.Form.Controls("TreeView5")
Dim bar As WinForm.NavBar = e.Form.Controls("NavBar1")
Dim nd As WinForm.TreeNode
bbml = ProjectPath & "\\报表\\"
MainTable = Tables("库存表")
Tables("主窗口_Table1").DataSource = DataTables("库存表")
Bar.SelectedIndex = 0
Tables("库存表").OpenRecordGrid()
Tables("库存表").Filter = ""
Tables("库存表").Filter = "[当前库存] <>0"
tv.Nodes.Clear
tv.BuildTree("库存表", "物资类型|物品分类|物品名称")
nd = tv.Nodes.Insert("加载全部记录", "加载全部记录", 0)
tv1.Nodes.Clear
tv1.BuildTree("库存表", "物资类型|物品分类|物品名称")
nd = tv1.Nodes.Insert("加载全部记录", "加载全部记录", 0)
tv4.Nodes.Clear
tv4.BuildTree("库存表", "物资类型|物品分类|物品名称|规格型号")
nd = tv4.Nodes.Insert("加载全部记录", "加载全部记录", 0)
tv5.Nodes.Clear
tv5.BuildTree("出入库明细", "出入库|物资类型|物品分类|物品名称|规格型号")
nd = tv5.Nodes.Insert("加载全部记录", "加载全部记录", 0)
Dim n1 As WinForm.NavBar = e.Form.Controls("NavBar1")
MainTable = Tables("库存表")
这是afterload代码 麻烦老师帮我看一看