No, in this case, I even guess BINDEVENT isn't possible, as it's having some exceptions and preconditions for some methods and events.
It's a good exercise to have base classes so you can have a central code that acts in all forms.
And the native events have some downsides, as you noticed already. Release() is meant to be very enforced, but indeed most apps will check for unsaved changes before allowing to close, there also is the form.Closeable property and in QueryUnload you want to apply different strategies depending on what is the source of the query for unloading the form.RelaseType
There is a good way to wire all this, and that needs the OOP way of inheriting this from a base class, not a hack with bindevents, I would recommend going the hard route even if bindevent would work.
Both the QueryUnload event and the Release method should call a user-defined method to check whether you want to allow to close the form, in QueryUnload you then would differ from Release if the ReleaseType is 2, which means a shutdown. Then you might disregard unsaved changes and at best would TableREVERT() them, while the Release() method in such a case might focus the save button and ask to save or cancel changes via a messgebox().
Both QueryUnload and RElease can be canceled with NODEFAULT. If closing is allowed, both should set the form.closable=.T.
You will have some common code in Release() and QueryUnload(), but that's OK, you need different overall strategies in the even QueryUnload and the method Release(). Programming code in the Release() will cover all places calling that method for triggering the native base behavior of releasing the form, your new code in that method can stop any call in the one central place.
These are two exits, the common code they call is for determining whether the situation allows closing, you might add another user-defined method to execute at the stage in both QueryUnload and Release, when you're deciding to close the form even forcefully and let that already do part of the cleanup that doesn't work naturally, but there is something wrong, if some references deadlock each other.
Bye, Olaf.
Olaf Doschke Software Engineering