PC SOFT

FORUMS PROFESSIONNELS
WINDEVWEBDEV et WINDEV Mobile

Accueil → WINDEV 2024 → Forced application timeout w/ inactivity
Forced application timeout w/ inactivity
Débuté par M. Beaven, 28 mar. 2004 03:10 - 3 réponses
Posté le 28 mars 2004 - 03:10
In a posting by Joe Crevino below, he is having problem with WD timing out with inactivity. I need to replicate this behavior in one of my projects. Does anyone have input as to the best way to accomplish an application timeout globally (regardless of which window in the project is open) ? I know I need to use timersys() in conjunction with cursorpos(), but haven't yet been able to put together workable code.
Thanks for any help.
Marc
Posté le 28 mars 2004 - 06:21
Hi Marc,
I think what I did was in the automatic button validation I had a time with no button specified. This was in the mother window of all the child windows..
the main menu procedure. When I changed the field to never it stopped shutting down. I am not sure if this will help you .
joe
Posté le 28 mars 2004 - 15:38
In a posting by Joe Crevino below, he is having problem with WD timing out with inactivity. I need to replicate this behavior in one of my projects. Does anyone have input as to the best way to accomplish an application timeout globally (regardless of which window in the project is open) ? I know I need to use timersys() in conjunction with cursorpos(), but haven't yet been able to put together workable code.
Thanks for any help.
Marc

Hello Marc,
I would recommend to capture WM_CHAR and maybe some mouse events.
Use Event("CaptureActivity", "*.*", WM_CHAR)
and a procedure
CaptureActivity PROCEDURE(Msg, wParam, lParam)
IF TimeDifference(tLastActivity, Now()) >= 60000 THEN
// End Application or do something after 10 min
ELSE
tLastActivity = Now()
END
You can also use the same procedure with a mouse event (mouse move).
HTH Raimund
Posté le 30 mars 2004 - 17:51
In a posting by Joe Crevino below, he is having problem with WD timing out with inactivity. I need to replicate this behavior in one of my projects. Does anyone have input as to the best way to accomplish an application timeout globally (regardless of which window in the project is open) ? I know I need to use timersys() in conjunction with cursorpos(), but haven't yet been able to put together workable code.
Thanks for any help.
Marc