>Come to think of it, there is no "ReleaseType" form property. No luck with that one.
Well switch to VFP7, and you'll have it. Here's the set of possible values, straight from Help:
0 Variable released.
1 Close menu command or close box.
2 Exit Visual FoxPro.
So you'd only have to test for this, and there you are.