The program has not been used for 2 minutes

I will not pop up in a certain way when the user has not used the program for 2 minutes, say.

Values: When the application starts, and the user did not press any key / any button / did not move the cursor at all for 2 minutes, I want the application to detect it and show an instance of one of the form window. I am using a winform application in C #.

How can i do this? Tal.

+5
source share
3 answers

See the event Application.Idleand this related question:

How to determine when a program is inactive?

A detailed example is also provided here:

http://www.codeproject.com/KB/miscctrl/Application_Idle.aspx

+5

, . :

0

Does your application use any kind of user intervention? In this case, you can’t just be idle.

Perhaps in such cases, the best option would be to use timers!

0
source

All Articles