After particular interval time already opened Messagebox Close Automatically
How To give Condition?
Please give Some Example
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Neeraj KumarRank #355 · 7K reputationPosted Jul 8, 2015, 4:06 AM EDT
private void Form1_Load(object sender, EventArgs e) { Timer MyTimer = new Timer(); MyTimer.Interval = (5 * 60 * 1000); //5 mins MyTimer.Tick += new EventHandler(MyTimer_Tick); MyTimer.Start(); } private void MyTimer_Tick(object sender, EventArgs e) { MessageBox.Show("The form will now be closed.", "Time Elapsed"); this.Close(); }Munesh SharmaRank #174 · 13.9K reputationPosted Jul 8, 2015, 4:16 AM EDT