I'm having a problem with this code snippet: (C#)
Expand|Select|Wrap|Line Numbers
- 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?