Answers for "c# load form after 5 second"

C#
1

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);
        }
Posted by: Guest on January-06-2021

C# Answers by Framework

Browse Popular Code Answers by Language