I am building a Forms application that need to close itself if an amout of time of inactivity is detected.

I have done the following :
In the WHEN-NEW-FORM-INSTANCE of a startup form :

/* The following form will run in parallel */
Open_Form('checking_inactivity_form', NO_ACTIVATE);

/* The following form will block the startup form until it ends */
Call_Form('Main_form', HIDE, NO_REPLACE);

/* When the main_form exits, exit the startup form in order to close the application */

In the checking_inactivity_form, there is a timer that look for inactivity and when the amout of time is reached, I want to terminate the whole Forms application.

I need an instruction that can Exit the entire application from checking_inactivity_form. Close_Form cannot work here because of the hierarchy of calling forms.

Maybe there is a way to do that with event handling like in C# or java ? (startup form is listenning to an event and checking_inactivity_form can raise it...)

If you dont have an answer, but have a good solution to closing a Form application when too much idle time is spent, please reply !

Philippe Cayouette