以文本方式查看主题

-  Foxtable(狐表)  (http://www.foxtable.com/bbs/index.asp)
--  专家坐堂  (http://www.foxtable.com/bbs/list.asp?boardid=2)
----  并列窗口  (http://www.foxtable.com/bbs/dispbbs.asp?boardid=2&id=145234)

--  作者:lshshlxsh
--  发布时间:2020/1/13 13:41:00
--  并列窗口
请问 并列窗口在关闭前怎么获取 窗口名称?
e.TabPage.name  这句弹出 是空白的


AfterOpenProject

If Forms("主窗口").Opened Then
    Dim t As C1Command.C1DockingTab = Forms("主窗口").panel.parent.parent
    t.CanCloseTabs = True
    t.CloseBox = 2
    AddHandler t.TabPageClosing, AddressOf _TabPageClosing
End If


全局代码

Public Sub _TabPageClosing(sender As Object, e As C1.Win.C1Command.TabPageCancelEventArgs)
\'页面关闭按钮点击事件
MessageBox.Show(e.TabPage.name)
If e.TabPage.text = "主窗口" Then    
    MessageBox.Show("主窗口不能关闭!")
    e.Cancel = True
Else
    Forms(e.TabPage.text ).Close
    e.cancel = True
End If
End Sub
[此贴子已经被作者于2020/1/13 14:04:51编辑过]

--  作者:有点蓝
--  发布时间:2020/1/13 15:02:00
--  
只能获取窗口标题