override close event
How can I override the close event on a child window so that i can cancel it being closed without effecting the parent window?
Here's the code i'm using to cancel the close event in my child window:
Here is the code I use to open the child window initially:
How can I override the close event on a child window so that i can cancel it being closed without effecting the parent window?
Here's the code i'm using to cancel the close event in my child window:
C#:
private void StatusForm_Closing(object sender, System.ComponentModel.CancelEventArgs e)
{
e.Cancel = true;
}
Here is the code I use to open the child window initially:
C#:
StatusForm chStatusForm = new StatusForm();
chStatusForm.MdiParent = this;
chStatusForm.Show();
Last edited: