can I replace a pressed key by another in a control

  • Thread starter Thread starter jean-dot-paul-at-opelwilly-dot-com
  • Start date Start date
J

jean-dot-paul-at-opelwilly-dot-com

Hello,

Is there a known way to replace a pressed key by an other.
KeyPressEventArgs.KeyChar is read-only so is there a work arround.

I want to change the decimal point of the numeric keypad into

CultureInfo.CurrentCulture.NumberFormat.CurrencyDecimalSeparator

at anny time.



Greets

Jean Paul
 
Take a look at the OnKeyDown event of Control. There is cod ethat shows how
to trap said keys. Now you can always set your own text string to whatever
you want so if I were to type "ABCD9" and you want to change the '9' to an
'E' you could just set your string to "ABCDE" with a simple string.Replace

JIM
 
Back
Top