D
Dale Williams
Everyone:
When working with winform applications, you could check the reason for
closing the window. As in this example:
private void MainForm_FormClosing(object sender,
FormClosingEventArgs e)
{
if (e.CloseReason == CloseReason.UserClosing)
{
if (CloseApplication())
Application.Exit();
else
e.Cancel = true;
}
}
Now, e doesn't return a closereason. Is there anyway to check why the
window is closing?
Thanks,
Dale Williams
When working with winform applications, you could check the reason for
closing the window. As in this example:
private void MainForm_FormClosing(object sender,
FormClosingEventArgs e)
{
if (e.CloseReason == CloseReason.UserClosing)
{
if (CloseApplication())
Application.Exit();
else
e.Cancel = true;
}
}
Now, e doesn't return a closereason. Is there anyway to check why the
window is closing?
Thanks,
Dale Williams