Created
March 7, 2014 07:10
-
-
Save ochilab/9406756 to your computer and use it in GitHub Desktop.
C#: フォームのクローズボタンが押された場合の処理。このイベントは追加すること。
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void Form1_FormClosing(object sender, FormClosingEventArgs e){ | |
DialogResult result = MessageBox.Show("終了しますか?", "システム終了",MessageBoxButtons.YesNo, MessageBoxIcon.Question); | |
if (result == DialogResult.No){ | |
e.Cancel = true; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment