In my Project I included a splash-screen.
For that i wrote below code in Login Window Contractor. The Splash Screen is working perfectly. But after login, the main page is opened. if it is closed, then login is opened.
In that the Splash Screen is cross the Login page. I don’t want this.
How to do this: Splash Screen Shown only once in my project?
Help me…
public LogIn()
{
InitializeComponent();
Thread th = new Thread(new ThreadStart(Splash));
th.Start();
Thread.Sleep(3000);
th.Abort();
Thread.Sleep(1000);
}
private void Splash()
{
Welcome sp = new Welcome();
sp.ShowDialog();
}
if you want the SplashScreen to close after 3 Seconds then use a timer in the SplashScreen and after 3 Seconds user this.close()