By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,892 Members | 1,200 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,892 IT Pros & Developers. It's quick & easy.

can I replace a pressed key by another in a control

P: n/a
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.CurrencyDe cimalSeparator

at anny time.

Greets

Jean Paul
Nov 16 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
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
"jean-dot-paul-at-opelwilly-dot-com" <i@a> wrote in message
news:ue*************@TK2MSFTNGP14.phx.gbl...
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.CurrencyDe cimalSeparator

at anny time.

Greets

Jean Paul

Nov 16 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.