Confirm Massage 창 띄우기
msdn Url : http://msdn.microsoft.com/ko-kr/library/system.windows.forms.messagebox.aspx
private void Form1_FormClosing(object sender, FormClosingEventArgs e) { const string message = "Are you sure that you would like to close the form?"; const string caption = "Form Closing"; var result = MessageBox.Show(message, caption, MessageBoxButtons.YesNo, MessageBoxIcon.Question); // If the no button was pressed ... if (result == DialogResult.No) { // cancel the closure of the form. e.Cancel = true; } }