* Russell Hind <no-one@no-where.com> scripsit:
> The OnKeyPress event doesn't fire if the Key is 'delete' (it fires for
> backspace).
Check the 'KeyDown' event.
> How are you supposed to validate text entry as they type if keys that
> can change the contents don't fire the event?
The text should be validated in the control's 'Validating' event.

Signature
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
<URL:http://dotnet.mvps.org/dotnet/faqs/
Russell Hind - 26 Jul 2004 12:59 GMT
> * Russell Hind <no-one@no-where.com> scripsit:
>
>>The OnKeyPress event doesn't fire if the Key is 'delete' (it fires for
>>backspace).
>
> Check the 'KeyDown' event.
I've found that now. Thanks
>>How are you supposed to validate text entry as they type if keys that
>>can change the contents don't fire the event?
>
> The text should be validated in the control's 'Validating' event.
I'll have a look at it, but at the moment I have a simple wrapper class
that can wrap both Borland's VCL controls and .Net classes to give me a
common, standard C++ interface to UI elements, and the VCL doesn't have
a validating method so I've already got code that worked with OnKeyPress
(just never realised that OnKeyPress didn't fire with delete but I
understand now why not).
I code simulate Validating in VCL but its all working for now.
Thanks
Russell