-1
私はウィンドウフォームアプリケーションの作成にC#を使用しています。私はMDIインターフェイスを使用しています。ウィンドウフォーム終了イベント
しかし、私はそのようにしたい:
private void Earnings_Leave(object sender, EventArgs e)
{
DialogResult result = MessageBox.Show("Are you sure to Quite this form","confirmation Message", MessageBoxButtons.YesNo, MessageBoxIcon.Warning);
if(result==DialogResult.Yes)
{
this.Close();
}
else if (result == DialogResult.No)
{
Earnings sibling = new Earnings();
sibling.MdiParent = this.MdiParent;
sibling.Show();
}
}
しかし、これはフォームが機能していない両方の条件に終了します私を助けてください。