>Hi all!
>
>I created a class based on a text box. I let the user to change the value of a text box pressing CTRL+P (Return "Positive") And pressing CTRL+N return "Negative".
>
>I do this using keypress event. The problems is the CTRL+N return a strange character before "Negative", something like "|Negative". This strange character is CHR(14), I need to solve this as soon a possible.
>
>Please help.
Hi Plinio,
The KeyPress event's default behavior is to add the key that was pressed to the string stored by the textbox. CHR(14) is {CTRL+N}'s keycode. All you should have to do is issue NODEFAULT in your KeyPress code when you want to prevent special characters such as {CTRL+N} from being added to the textbox.
HTH,
Ned
Ned
Reality is.