I am designing a small application in which I open a new form with some controls. I want to close this form if idle for some time. Let say the form is having many buttons, scroll bars, picture box....if none of them is clicked (within 10 seconds) the form should close.
I have used a timer of 10 seconds , i want to reset it if any of the control is pressed. I can do it individually but would become very cumbersome doing it for all the controls. Can i do it by some simpler way....I read on net:
foreach (Control cc in Controls)
but didn't knew how to use it. Please help.