I have a custom Form class, which is reacting to the Closing event, like this:
class MyForm: Form
{
...
private void MyForm_FormClosing(object sender, FormClosingEventArgs e)
{
if ( ... )
e.Cancel = true;
}
...
}
Now, somewhere else, I call Close() on this form:
MyForm frm;
...
frm.Close();
Question: After calling Close(), how can I find out whether the form was really closed, or if the closing was cancelled in the Closing Event?
The Close() method does not return a value, and it also does not throw an exception.