Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Determining session inactivity from within a form

Status
Not open for further replies.

msc0tt

IS-IT--Management
Jun 25, 2002
281
CA
We use Forms 4.5 for a custom app that connects to our Oracle server. I would like to have the app 'close itself' after n-minutes of inactivity. Is there a property(s) that indicates last activity? Is there another way of doing this?
-much appreciated

p.s. I know there are ways to have the server disconnect an IDLE connection, but I need the client to do some 'clean up' activities before having the cord pulled.
 
What do you mean by "inactivity"? You may use timer, but the term "inactivity" is a bit vague: are resizing a window or moving a mouse or other events activities? So you should decide which events may reset this timer.
 
I would consider activity any use whatsoever of the form (i.e. TABing between fields, entering data, pressing a button control, ...). Moving the form, moving the mouse pointer over the form, and resizing the form would be exceptions to 'activity'.

I did initially think about a TIMER control, but wouldn't I have to create an event for EVERY object (on every form) in the interface which resets my timer upon use?
 
You may reset timer only on FORM level, not for every element. You may also create template form or inherit your forms from object library.
 
I don't know if you still have the problem. But there are the Windows System Interface routines (see Forms Help)I supposed can be usefull for you. (I don't know if you can use this capability (I'm a little beginner). I use Forms6.

For example:

Win_Api_Session.Timeout_Start_Timer

Description

The Timeout facility consists of three calls. Timeout_Start_Timer starts a background timer, Timeout_Get_Inactive_Time returns the time in seconds that have elapsed since the user did anything in the application, and Timeout_Delete_Timer removes the timer.

Greetings.
 
In fact, Forms ITSELF contains timer utility, that is portable, contrary to Win_Api_Session call.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top