if (e.CloseReason == CloseReason.MdiFormClosing)//判断点击的是父窗体还是子窗体
{ }
else if (e.CloseReason == CloseReason.UserClosing)
{
e.Cancel = true;
MessageBox.Show(“无法进行关闭”);
}
C# MDI中,关闭窗体时怎么判断关闭的是父窗体还是子窗体
最新推荐文章于 2020-12-22 21:32:55 发布
if (e.CloseReason == CloseReason.MdiFormClosing)//判断点击的是父窗体还是子窗体
{ }
else if (e.CloseReason == CloseReason.UserClosing)
{
e.Cancel = true;
MessageBox.Show(“无法进行关闭”);
}