且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何在子窗体2关闭时以mdi父窗体显示消息框

更新时间:2023-12-06 09:09:16

而不是依赖于激活方法为另一个孩子 - 如果只有一个孩子可能不会发生MDI子项打开 - 处理FormClosing或FormClosed事件,并在其中显示您的消息框。
Instead of relying on the Activate method for a different child - which may not happen if there is only one MDI child open - handle the FormClosing or FormClosed event instead and display your message box in that.