更新时间: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.