c# load form after time
// 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);
}
4.25
7
// 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; // 10 seconds
timer1.Start();
timer1.Tick += new EventHandler(timer_Tick);
}
Thank you!
7
0
Are there any code examples left?
New code examples in category C#