Home » Developer & Programmer » Forms » Timers used in a multiple form application
Timers used in a multiple form application [message #85160] Sat, 05 June 2004 02:22 Go to next message
Robert Baron
Messages: 7
Registered: May 2002
Junior Member
I have a multiple form application.  The users go to lunch and leave their system on.  Can I use a timer globally to check for inactivity, then exit the application?
Re: Timers used in a multiple form application [message #85166 is a reply to message #85160] Sun, 06 June 2004 21:02 Go to previous messageGo to next message
nsk
Messages: 16
Registered: June 2004
Junior Member
Yes. u should have designed menu form for application.
write when-timer-expire trigger in u r timer their.
Re: Timers used in a multiple form application [message #85232 is a reply to message #85166] Thu, 10 June 2004 03:30 Go to previous messageGo to next message
Robert Baron
Messages: 7
Registered: May 2002
Junior Member
Thanks for the help Santosh. Please amplify. So, I put a timer in the menu form for say 30 minutes. I'll use a when-timer to exit the application if the user has no activity. If the user is working in called forms, do I want to reset the timer back to 30 minutes in all the forms? Do I use a global variable for the timer? Do you have code examples?
Re: Timers used in a multiple form application [message #85248 is a reply to message #85232] Fri, 11 June 2004 00:43 Go to previous message
nsk
Messages: 16
Registered: June 2004
Junior Member
before using this code plz. attach libary d2kwutil.pll or winutil.pll which is available in demo files of form. then use this code..

I hope this will help in solution.

*When-New-Form-Instance:
declare
hWind PLS_INTEGER;
CheckTimer TIMER;
begin
hWind := get_window_property(FORMS_MDI_WINDOW,WINDOW_HANDLE);
Win_API_Session.Timeout_Start_Timer(hWind);
Create_Timer('CheckTimeout',1000,repeat);
end;
*
*When-Timer-Expired:
begin
if upper(get_application_property(TIMER_NAME)) = CHECKTIMEOUT' then
if Win_API_Session.Timeout_get_inactive_time > 100000 then
* -- Logout after 100 secs of idle
Win_API_Session.timout_delete_timer;
exit_form (NO_VALIDATE);
end if;
end if;
end;
Previous Topic: how to pass short integer to Acrobat via OLE ?
Next Topic: Duplicate Record Validation During Data Entry
Goto Forum:
  


Current Time: Tue May 07 12:21:44 CDT 2024