Tim (digitig) wrote in csharp,
Tim
digitig
csharp

  • Mood:

Application.Exit() not exiting!

I have the following:
                if (userDlg.ShowDialog(this) == DialogResult.Cancel)
                {
                    Application.Exit();
                }
But when I run the code, the application is not exiting when I click the cancel button on the userDlg dialog. Stepping through in the debugger it's hitting the Application.Exit(); line ok, but just carrying on!

So how can I get the program to terminate (neatly!) at this point?

Thanks in advance,

Tim
  • Post a new comment

    Error

    default userpic
  • 13 comments