You could set the cancel button to return mrAbort.
 
Rob
 
Software engineer
Wild Software Ltd
New Zealand
 
Ph 03 377-0495
Fax 03 377-0496
----- Original Message -----
Sent: Wednesday, June 25, 2003 11:51 AM
Subject: [DUG]: Modal FormClose

I have a Modal Form that I want to identify, in the OnClose or OnCloseQuery events, if the user Closed the form (Top-Right X) or clicked a Button causing the close (OK or Cancel - with their respective ModalResults). Both ways of Closing the Form call the Close events and have a ModalResult (mrCancel for Button Cancel and Top-Right X).
Is their an easy way to identify which caused the close.
I can have a Form variable to do it (I don't like Form variable for this sort of thing).
I could set both buttons to use mrOK (but one button is cancel)
 
Any suggestions appreciated.
 
Regards
Paul McKenzie
Analyst Programmer
SMSS Ltd.
 

Reply via email to