老师,你好,由窗口菜单编辑器设计的“主菜单”下类型为MenuItem的最底层子项,在窗口ItemClick代码下添加什么代码,可以做到像窗口目录树双击事件代码(如下)那样,在控件页面集合新增并打开事先做的对应窗口?谢谢!

此主题相关图片如下:33.png

NodeMouseDoubleClick:
If e.Node.Level = 1 Then
Dim t As WinForm.TabControl = Forms("敏捷系统框架").Controls("TabControl1")
Dim p = t.TabPages(e.Node.Text)
If p IsNot Nothing Then
t.SelectedPage = p
Return
End If
p = t.TabPages.Add(e.Node.Text ,e.Node.Text)
Forms(e.Node.Text).OPEN(-1000,-1500)
Forms(e.Node.Text).baseform.Dock = System.Windows.Forms.DockStyle.Fill
Forms(e.Node.Text).baseform.TopLevel = False
Forms(e.Node.Text).baseform.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None
p.Controls.Add(Forms(e.Node.Text).baseform)
t.SelectedPage = p
Forms(e.Node.Text).Show()
End If
[此贴子已经被作者于2019/12/16 12:01:45编辑过]