The requirement in my work is to first show a splash screen which takes in a some data from user, authenticates him and starts another form. So, I am starting the splash screen with Application.Run and once, it has done its done, call Application.Exit and then call Application.Run again for the new form. But, this doesn't start the new form. I have a create a new thread and assign its ApartmentModel as STA to start the new form.
I would like to understand why is Application.Run not working after calling Application.Exit?
Sample Code:
Application.Run(SplashForm);
if (_authorizationSuccessful)
Application.Run(new Form2())
else
{
//just close
}