When I start application without specific form e.g.
Application.Run();
And then I create form, after user closes it, the process just hangs.
This happens outside of Visual Studio.
I tried to put Application.Exit()
and/or Application.ExitThread()
in form's Form_Closing
event, but it still hangs.
Edit: Using custom ApplicationContext unfortunately doesn't work.
FYI, I'm not using any threads nor BackgroundWorkers.