G
Guest
I've got a form with OK/Cancel buttons and a control box "X" button. Cancel
is fully wired with DialogResult and all that jazz.
There is a textbox on the form with a Validating event.
The Cancel button has CausesValidation = false.
If I click the Cancel button, validation is skipped and everything's fine.
However, if I hit the escape key or alt-C (Cancel mnemonic), validation
still takes place. It's behaving as if these latter two methods (escape and
alt-C) are interally causing the textbox to lose focus and thus validate
before the cancel_click event fires.
Thoughts/comments?
is fully wired with DialogResult and all that jazz.
There is a textbox on the form with a Validating event.
The Cancel button has CausesValidation = false.
If I click the Cancel button, validation is skipped and everything's fine.
However, if I hit the escape key or alt-C (Cancel mnemonic), validation
still takes place. It's behaving as if these latter two methods (escape and
alt-C) are interally causing the textbox to lose focus and thus validate
before the cancel_click event fires.
Thoughts/comments?