private void Form1_MdiChildActivate(object sender, EventArgs e)
{
//form is new mdi child
Form form = this.MdiChildren.Last();
form.FormClosed += SenderForm_Close;
}
private void SenderForm_Close(object sender, EventArgs e)
{
//form is new closed mdi child
Form form = sender as Form;
}
2条答案
按热度按时间deyfvvtc1#
它确实如L.B所说:在窗体类中创建一个重写。它可以放在类中的任何位置
在关闭时无效(CancelEventArgs e)数据。Windows = -1;//假设该变量在那时仍然存在}
a7qyws3x2#
以下是您的答案: