General information
Category:
Coding, syntax & commands
Title:
How to close modal forms on shutdown?
Hi all,
I am using a ON Shutdown procedure to release all active forms, close all data tables, clean up and quit when the user clicks on the main screen close button, or when Windows is shutting down, etc. Most forms are modeless and the on shutdown procedure works as expected until I have a modal form, browse window, or messagebox on the screen as the active window. If this is the case, my app hangs ON SHUTDOWN. I am using VFP6 SP5.
_screen.closable = .t. and the modal form is closable.
I thought it had something to do with the order that I was releasing the forms. I have tried releasing _screen.forms() in ascending order and descending order with the same result. It appears that the active window is _screen.forms(1) so I try releasing _screen.forms(1) until formcount = 0. This must be causing a dangling reference or somthing, because when the active form is modal, _screen.forms(1) seems to be the reference to the modal form, but _screen.forms(1).release does not release it.
How do you close MODAL screens on shutdown?
TIA.
Elmer
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only