"Law" <an*******@discussions.microsoft.com> wrote...
Tks for your advice. The defination for the term of not in
use which is means that the end user doesn't key-in
anythings or the application idle for long time..
could you provide me with an example on how to count
as "use" in "keypressed" or "mouseover"? or do you know
there can i get an example from internet?
I'm sure you can find an example of implementing a timer, there are short
tutorials all over. You probably want to make it public so every part of
your application can reference it.
There is (depending upon the type of timer you use) a property like
..Interval in System.Timers.Timer that can be set. 1000 is one second, 60000
would be one minute, etc. and it fires an Elapsed event every time the
counter gets to zero. If you set it for 10 minutes and then reset it every
time some activity takes place it wouldn't get down to zero and the event
wouldn't fire. That event would shut down the app.
You would have to add code to keyboard and mouse events to reset the
..Interval value.
Tom