Idle event

  • Thread starter Thread starter msnews
  • Start date Start date
M

msnews

Hi All!

In my vb.net application i have to check if the application is idle for 10
minutes then restart the application.

How to track the Idle time and how to call the idle event?
How to write code for my above requirement?
 
msnews said:
Hi All!

In my vb.net application i have to check if the application is idle
for 10 minutes then restart the application.

How to track the Idle time and how to call the idle event?
How to write code for my above requirement?

Add a Timer (e.g. interval=1000) and call API function GetLastInputInfo in
it's Tick event. Subtract the returned value from Environment.tickcount to
get the idle time.


Armin
 
Back
Top