G
Guest
I am trying to use the timer to make a login form show after a specified
interval. However, if the interval is set to a value greater than 5000
nanosecond, then it does not respond. What could be the issue here? Thanks.
private void frmMain_Load(object sender, EventArgs e)
{
this.timer = new Timer();
this.timer.Interval = 25000;
this.timer.Tick += new EventHandler(this.timer_Tick);
Application.Idle += new EventHandler(this.Application_Idle);
}
void Application_Idle(object sender, EventArgs e)
{
this.timer.Stop();
this.timer.Start();
}
void timer_Tick(object sender, EventArgs e)
{
frmLogin form = new frmLogin();
form.ShowDialog();
}
interval. However, if the interval is set to a value greater than 5000
nanosecond, then it does not respond. What could be the issue here? Thanks.
private void frmMain_Load(object sender, EventArgs e)
{
this.timer = new Timer();
this.timer.Interval = 25000;
this.timer.Tick += new EventHandler(this.timer_Tick);
Application.Idle += new EventHandler(this.Application_Idle);
}
void Application_Idle(object sender, EventArgs e)
{
this.timer.Stop();
this.timer.Start();
}
void timer_Tick(object sender, EventArgs e)
{
frmLogin form = new frmLogin();
form.ShowDialog();
}