Hey there,
I'm having a problem with this code snippet: (C#)
MainForm throws the event, doesn't close, and shows the dialog.
If I add a watch on result, I can see it gets "OK" as its value, however, the application does not close. Any thoughts?
I'm having a problem with this code snippet: (C#)
Code:
private void MainForm_FormClosing(object sender, FormClosingEventArgs e)
{
e.Cancel = true;
OtherForm dialog = new OtherForm();
DialogResult result = dialog.ShowDialog();
if (result == DialogResult.OK)
{
Application.Exit();
}
}
If I add a watch on result, I can see it gets "OK" as its value, however, the application does not close. Any thoughts?
Comment