> Anyway, you can use the KeyDown event to reject the invalid keys.
All sample code I found accept numbers like 9999999999 that are build from
correct keys but are not valid Int32 values...
Moreover I have some "encoding helper" job to do while validating the
final value : Example : 12,3456,789.25 should be accepted and transformed to
123.456.789,25 ( "," is decimal sep here). This kind of things can be done
only at Validating time. hence the problem remains with controls like
ToolStripButtons.
The things I can't understand is that Controls have a Validating event
that is not guaranteed to be fired when user click on other controls (like
ToolStripButton,.)...unbelivable... Imagine a click event on a control that
is not guaranteed to be fired when user click the control. unreliable so
unusable from a professional standpoint..
Thanks for your help, I keep searching a validating solution. The best is
maybe to wait until VS "Hawaii" to be done...
Steph.
> I would go in a different direction, I will not let the user enter
> non-numeric values
[quoted text clipped - 35 lines]
> >
> > Steph
ignacio machin - 10 Nov 2006 15:29 GMT
Hi,
What make u think that it will be different in "hawaii" ?
you can do validation in the KeyDown, the ugliest one would be trying to
convert it to Int32 and handling the exception.
Take a look at CausesValidation though.
> > Anyway, you can use the KeyDown event to reject the invalid keys.
>
[quoted text clipped - 64 lines]
> > >
> > > Steph