>>
>>Intercept the QueryUnload() Event. NODEFAULT will avoid the default behaviour, in this case, closing the form.
>
>Not if it's the main VFP window. That only works for user defined forms.
hmmm...I made the same mistake as Hilmar. Let's assume a form would be open when this restriction would be in place.
My ON SHUTDOWN routine cycles through any open forms, and calls their QUERYUNLOAD() methods to determine if they can be released. And I thought releaseType was a reliable check, even when closing the VFP screen...until I just hammered it over and over.
I clicked on the _screen close ("X") several times...and the queryunload() will work properly. But at a certain point (it may be 5 attempts, it may be 15 attempts), the form's releaseType will be 0, and queryUnload() will allow the form to close.
VFP6SP5.
Any thoughts?
Steve Gibson