private void form1_FormClosing(object sender, FormClosingEventArgs e) { MessageBox.Show("Form Closing..."); e.Cancel = true; MessageBox.Show("Form Closing Canceled."); }