Gene Wirchenko wrote on 2013-12-10: 
>  Dear Vixens and Reynards:
>        Suppose that I have a grid control with an invalid value
>  entered in it.  I have not yet tried to move focus off it.  I then
>  click on the form close button in the titlebar.
>        I would like to be to bypass the validation in that case,
>  either just exiting and discarding changes or asking "Discard
>  changes?" and acting accordingly.
>        Unfortunately, the validation for the control fires before the
>  queryunload fires.
>     1) How can I detect that the titlebar close button has been
>  clicked soon enough to decide that the validation should be bypassed?
>     2) If I decide to get rid of the titlebar buttons, but I want to
>  have an exit button acting similarly to the above, how do I get the
>  functionality?  (On this one, I *think* that in the control's
>  validation code, I look to see if the object under the mouse pointer
>  is the exit button.  However, in this scenario, I am not sure that I
>  can decide not to close the form after all ("Discard
>  changes?"  "No.") and still have the focus correct for the grid.)
>  
>  Sincerely,
>  
>  Gene Wirchenko
> 

Gene,

Have you seen the "ReleaseType" property of a form? I'm not sure if it will
help.

Tracy Pearson
PowerChurch Software


_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: 
http://leafe.com/archives/byMID/profox/[email protected]
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to