Idle event

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?
 
A

Armin Zingler

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top