How to stop ALL user interaction?

Started by Mark Strickland, May 01, 2006, 11:35:56 AM

Previous topic - Next topic

Mark Strickland

I have an app with many open Cheetah files.  It takes a little while to close them all.  It seems at least one user is prone to double clicking just about everything if it does not respond instantly.  While the program is doing it's "housekeeping" to shutdown you can navigate to other tabs, select functions, click buttons, etc.  There are way too many functions to add some "flag code" to catch that a shutdown is in progress.

Here is what I did but maybe there is a better way ---

Once the shutdown is selected (menu or click the Window X) the program sets a global flag and then minimizes itself.  If the user clicks on the start ribbon to restore the Window the SIZE event on the main form detects a resizing and if the shutdown flag is set it re-minimizes.  The theory is if you can't see the form you can't click any controls.  Once the "housekeeping" is done the program just ends.

I suppose I could popup a modal form and put the "housekeeping" in the CREATE of the modal form.

Thanks.

Roger Garstang

Good, or you could disable the Form/Window and display a Please Wait type message...

Mark Strickland

Duhhhhh ---

Disable the FORM --- never thought about that one!  The list of forms is obviously much smaller than the list of controls and it all works off a main tab control so maybe disabling the current form and tab to stop switching might work.

I wonder if that will disable menus on a disabled form?

Different brains --- different perspectives ---

Thanks.