I have an application with a splashscreen. When the splashscreen disappears, the window opens maximizend for a fraction of a second and then my application goes back to the background (like it's minimized). Why does this happen? My form has WindowState = Maximized
enabled.
public Main()
{
//Splashscreen and new window
initializeWindow();
}
public void SplashScreen()
{
Application.Run(new SplashScreen());
}
private void initializeWindow()
{
//Start new Thread which shows Splash Screen
Thread t = new Thread(new ThreadStart(SplashScreen));
t.Start();
//Wait 3 seconds
Thread.Sleep(3000);
InitializeComponent();
//Initialize form
t.Abort();
//Abort and make main form the top form
//TopMost = true; <-- I commented this because it makes other applications not open unless if I minimize the window
}