Hi,
you can achieve this using timer control in C#.NET , before that generate
Deactivate & Activated event for Window form and implement below in that
private void Form_Activated(object sender, EventArgs e)
{
timer1.Stop();
timer1.Enabled = false;
}
private void Form_Deactivate(object sender, EventArgs e)
{
timer1.Enabled = true;
timer1.Tick += new EventHandler(timer1_Tick);
timer1.Interval = 10000;
timer1.Start();
}
void timer1_Tick(object sender, EventArgs e)
{
if (timer1.Interval == 10000)
{
timer1.Stop();
this.Close();
}
}