PC SOFT

PROFESSIONAL NEWSGROUPS
WINDEVWEBDEV and WINDEV Mobile

Home → WINDEV 2024 → Forced application timeout w/ inactivity
Forced application timeout w/ inactivity
Started by M. Beaven, Mar., 28 2004 3:10 AM - 3 replies
Posted on March, 28 2004 - 3:10 AM
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
Posted on March, 28 2004 - 6:21 AM
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
Posted on March, 28 2004 - 3:38 PM
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
Posted on March, 30 2004 - 5:51 PM
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