Hi
you can use this technique
1)
MouseMove -
event used to check whether the screen is active or not..
2)
Timer
- used to check the interval of 10 mins
rest you can understand from the below code..
private void Form1_Load(object sender, EventArgs e)
{
t.Tick += new EventHandler(t_Tick);
t.Start();
}
Timer t = new Timer() { Interval = 5000 };
private void Form1_MouseMove(object sender, MouseEventArgs e)
{
t.Stop();
this.Text = "active" + DateTime.Now.ToString();
t.Start();
}
void t_Tick(object sender, EventArgs e)
{
MessageBox.Show("Application will exit now ");
Application.Exit();
}
use this widget for time calculation.
Minutes to Milliseconds[
^]