Under certain circumstances, I wish to display an error message to the user if the application didn’t shut down properly, but MessageBox.Show() doesn’t actually do anything after calling Application.Exit(). Is there a way to convince it to show a dialog after Application.Exit()?
Share
You will have to use a parent process that launches the Application. When the Application returns the return value is available to the parent process. If the return value of the Application is non-zero (not a success), then show the MessageBox from the parent process.