private void Form1_FormClosing(object sender, FormClosingEventArgs e) { MessageBox.Show ("Closing..."); }
private void Form1_FormClosing(object sender, FormClosingEventArgs e) { if(MessageBox.Show("Are you sure you want to exit?", "My Application",MessageBoxButtons.YesNo) == DialogResult.Yes) { // Cancel the Closing event from closing the form. e.Cancel = true; } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)