J
Joe_Black
Hi All,
I want to stop my app from closing, unless the user specifically wants
it to, I use this code:
private void MainForm_Closing(object sender,
system.ComponentModel.CancelEventArgs e)
{
if(MessageBox.Show("Are you sure you wish to close Millenium?",
"Question", MessageBoxButtons.YesNo, MessageBoxIcon.Question)
== DialogResult.No)
{
e.Cancel = true;
}
}
The main form of my application calls this function on the Closing event.
The problem is this function never gets called, does any one know why
this may be the case, or should I be doing this elswhere?
Thanks
Joe
I want to stop my app from closing, unless the user specifically wants
it to, I use this code:
private void MainForm_Closing(object sender,
system.ComponentModel.CancelEventArgs e)
{
if(MessageBox.Show("Are you sure you wish to close Millenium?",
"Question", MessageBoxButtons.YesNo, MessageBoxIcon.Question)
== DialogResult.No)
{
e.Cancel = true;
}
}
The main form of my application calls this function on the Closing event.
The problem is this function never gets called, does any one know why
this may be the case, or should I be doing this elswhere?
Thanks
Joe