>Why the Destroy? Why wouldn't you check this in the QueryUnload? The property is set prior to this event and if it is from the Control Menu or Close Box, you can stop it with a NODEFAULT.
You can put it there too, I should have mentioned that. Its nice to keep all cleanup code in one spot, since QueryUnload doesn't automatically fire when you release the form, so I put it in Destroy and if I need custom code for a certain releasetype, I release it there.
But, yeah, if you need to prevent closing the form, you gotta do it earlier.
Précédent
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement