I start my form in the usual way:
Application.Run(new MainForm());
I want it to open and run until a certain time, then close. I\'ve tried
How about something like this:
public partial class Form1 : Form
{
private static Timer _timer = new Timer();
public Form1()
{
InitializeComponent();
_timer.Tick += _timer_Tick;
_timer.Interval = 5000; // 5 seconds
_timer.Start();
}
void _timer_Tick(object sender, EventArgs e)
{
// Exit the App here ....
Application.Exit();
}
}