Hi, In winform applications, Application.Exit() initiates application shut down. In case, where your application is not creating any other thread (oher than the default thread - main thread), this is OK and will halt application soon after Application.Exit().
But in case, where your application creates multiple threads, application will not be halted until all other running threads stop. If you are sure to halt application immediately after Application.Exit() irrespective of other threads work and stop them, use Environment.Exit(ExitCode). Regards, Mahesh S On Sat, Jan 3, 2009 at 3:25 AM, iDesmet <[email protected]> wrote: > > I replaced Application.Exit() with Dispose() and it worked! > > I'm wondering why I needed to use Dispose() instead of Application.Exit > () ?... > > Is it because in frmMainMDI_Closing I ask if the user is really sure > that he/she want's to exit or because in frmMainMDI_FormClosed I call > Application.Exit()?
