If e.Node.Level = 1 Then
目录树有1层或是2层甚至3层需要动态使用,求吗?
'MainTable = Tables(e.Node.Text)
'Forms(e.Node.Text).Open()
Dim tab As WinForm.TabControl = Forms("工作台").Controls("TabControl1")
Dim Name As String = e.Node.Text '获取节点名称
If tab.TabPages(name) Is Nothing Then
tab.TabPages.Add(name,name)
Dim pb = tab.BaseControl
Forms(Name).OPEN(-1000,-1500)
Forms(Name).BaseForm.TopLevel = False
Forms(Name).BaseForm.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None
Forms(Name).BaseForm.Dock = System.Windows.Forms.DockStyle.Fill
PB.TabPages(name).Controls.Clear
PB.TabPages(name).Controls.add(Forms(Name).BaseForm)
End If
tab.SelectedPage = tab.TabPages(name)
End If