winformでWindowを閉じる処理方法

Form1.Designer.cs に下記を追加
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.Form1_FormClosing);

form1にメソッドを追加
private void Form1_FormClosing(object sender, FormClosingEventArgs e)
{
some code;
}

C++

Posted by arkgame