c# load form after 5 second code example
Example: c# load form after 5 second
// add timer1 from toolbox to your form
// add this function above load function
void timer_Tick(object sender, EventArgs e)
{
var login = new Login(); // my second form is login
login.ShowDialog();
timer1.Stop();
timer.Enabled = false;
this.Close(); // close this form ( I name it logo form)
}
// in your load form add this code for me I have Logo form and need to load login form
private void Logo_Load(object sender, EventArgs e)
{
timer1.Interval = 10000;
timer1.Start();
timer1.Tick += new EventHandler(timer_Tick);
}