| Author |
reword a question Is there a simple way to detect idle timeout
|
|
| Chris Faulkner 2005-12-20, 8:23 pm |
| I need a way to know if the program has been idle to start a shutdown method.
| |
| Rick Miller 2005-12-20, 8:23 pm |
| Hello Chris,
Chris Faulkner < faulkner3606@cableon
e.net> wrote in
news:1BmBO#cBGHA.1448@news-server:
> I need a way to know if the program has been idle to start a
> shutdown method.
----
1st thought would be to use a timer object.
the timer would check for a flag of some sort.
The flag could be a file or property that is
written to or updated by actions within the
application.
Would need to decide which actions update the flag.
Then add code to perform the update.
Just an idea,
Rick Miller
| |
| Chris Faulkner 2005-12-20, 8:23 pm |
| Interesting Idea, Food for thought.
Chris
Rick Miller Wrote:
> Hello Chris,
>
> Chris Faulkner < faulkner3606@cableon
e.net> wrote in
> news:1BmBO#cBGHA.1448@news-server:
>
> ----
>
> 1st thought would be to use a timer object.
> the timer would check for a flag of some sort.
> The flag could be a file or property that is
> written to or updated by actions within the
> application.
> Would need to decide which actions update the flag.
> Then add code to perform the update.
>
> Just an idea,
> Rick Miller
| |
| David Stone 2005-12-21, 3:23 am |
| Rick Miller wrote:
> 1st thought would be to use a timer object.
> the timer would check for a flag of some sort.
> The flag could be a file or property that is
> written to or updated by actions within the
> application.
> Would need to decide which actions update the flag.
Every form's onMouseMove seems like a good candidate. Could have
an _app.warningForm that visibly counts down the last 20-30
seconds-- "App has been idle for 15 minutes and will shut down in
__ seconds. Click button to cancel shutdown.".
David
| |
| Denis Finch 2005-12-21, 9:23 am |
| Here is the code that I use and is placed in my main form onOpen function
// set timer - purpose to close form after 3 hour of idle time
this.timer = new timer()
this.timer.parent = this
this.timer.ontimer = {;this.parent.close()}
this.timer.interval = 18000
this.timer.enabled = true
function form_onClose
// disable the timer
this.timer.enabled = false
this.timer = null
I also have a table which has one record with a logical field so I also
start a timer that checks the status of this field once a minute. If the
logical field is set to true it will put the program in a shut down mode
which closes all tables used by the program. That way I can preform
maintance on the tables used by the program.
"Chris Faulkner" < faulkner3606@cableon
e.net> wrote in message
news:1BmBO%23cBGHA.1448@news-server...
> I need a way to know if the program has been idle to start a shutdown
method.
>
|
|
|
|