I want to use timer in my application, i have the doubt is there any option to pause the timer while the window is minimized and then it will start counting when the window is maximized.Hope the reply will be useful.
Thanks in advance.
Timer Pause
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.

Santhosh NRank #4,788 · 325 reputationPosted Jan 21, 2010, 7:50 PM EST
Nilanka DharmadasaRank #1,875 · 794 reputationPosted Jan 22, 2010, 2:47 AM EST
Hi Nila,
You can do it with 'SizeChanged' event of form.
private void Form1_SizeChanged(object sender, EventArgs e){
if (this.WindowState == FormWindowState.Minimized)
{
timer1.Enabled = false;
}
else
{
timer1.Enabled = true;
};
}
Check my code. It shows you the exact solution.Please do not forget to tick 'Do you like this answer' checkbox if my answer helps you.