函数改成
Dim e = args(0)
Dim tbc As WinForm.TabControl = e.Form.Controls("TabControl1")
For Each tbp As WinForm.TabPage In tbc.TabPages
If tbp.Name = e.Sender.Name Then
tbc.SelectedPage = tbp
Return ""
End If
Next
tbc.TabPages.Add(e.Sender.Name,e.Sender.Name)
Dim frm = Forms(e.Sender.Name)
frm.OPEN(-1000,-1500)
frm.BaseForm.TopLevel = False '窗口降级
frm.BaseForm.Dock = Windows.Forms.DockStyle.fill
frm.BaseForm.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None
tbc.TabPages(e.Sender.Name).Controls.add(frm.BaseForm)
tbc.SelectedIndex = tbc.TabPages.Count-1
' tbc.SelectedPage.Image = getimage("D:\delete_16x16.gif")
然后直接调用即可,如
Functions.Execute("test", e)
[此贴子已经被作者于2019/4/24 11:50:23编辑过]