Radu M.
Radu M.

Reputation: 1391

Processing control characters in a Winforms TextBox

I am using this sequence: Alt+27 (using the numeric keypad) in order to enter the 'Esc' character in a Winforms TextBox. Then I attempt to read back the textbox string using the Text property. I was expecting the first character to be 'Esc' (integer value 27) but instead I found that the integer value of 8592. What is going on? How can I read back correctly the 'Esc' character?

Upvotes: 0

Views: 191

Answers (1)

stuartd
stuartd

Reputation: 73243

Alt-27 is a shortcut for which is indeed Unicode character 8592 - see http://www.alt-codes.net/ for the full list.

Upvotes: 1

Related Questions