S
Steve Roggow
I am using a form that contains a TextBox class object of
which I capture the Validating event. This form is shown
as a dialog box. The problem is this: A user enters
invalid characters into the TextBox object and then
changes his/her mind and hits the escape key. Normally,
the ShowDialog function returns as if the user pressed
the cancel button - and this is the desired action.
However, with "validating" captured, the system invokes
my validating code BEFORE anything else (that I can
determine). There is no way to know that the user is
wanting to simply leave, so I need to pop up another
dialog box that complains about the invalid entry and
from here, the user may exit the form. I tried capturing
the events: "Leave, Keydown, Keypressed", etc to see if
these get invoked before "Validating" and no-dice.
The lack of any other postings regarding this , what I
would consider a common problem, tells me that I have
probably overlooked something obvious ...
Thanks for any help!
which I capture the Validating event. This form is shown
as a dialog box. The problem is this: A user enters
invalid characters into the TextBox object and then
changes his/her mind and hits the escape key. Normally,
the ShowDialog function returns as if the user pressed
the cancel button - and this is the desired action.
However, with "validating" captured, the system invokes
my validating code BEFORE anything else (that I can
determine). There is no way to know that the user is
wanting to simply leave, so I need to pop up another
dialog box that complains about the invalid entry and
from here, the user may exit the form. I tried capturing
the events: "Leave, Keydown, Keypressed", etc to see if
these get invoked before "Validating" and no-dice.
The lack of any other postings regarding this , what I
would consider a common problem, tells me that I have
probably overlooked something obvious ...
Thanks for any help!