3
Answers

Close form using timer


 I want to close a form after 1 sec  using c sharp
Answers (3)
1
Ankit Nandekar

Ankit Nandekar

NA 3.9k 2.1m 13y
TRY THIS
1. Drag Timer control from toolbox;
2.set its interval property 1000.
3.double click on timercontrol and in timer tick even write this.Close(); which close ur current form.like

 private void timer1_Tick(object sender, EventArgs e)
  {
  this.Close();
  }

4. ur Form Load event call timer1.Start(); which start ur timer on form load event.
5. Run ur form it will automatically close after 1 sec.
Accepted
0
Amith V

Amith V

NA 79 1 8y
How can i close a form after 40 sec or another time?
0
Hirendra Sisodiya

Hirendra Sisodiya

229 8.1k 4.6m 13y
you can try ankit's code...