Whats the KeyCode for overwriting a text in TextBox in winforms
- by Ragha J
I have a custom control which extends from TextBox.
In the KeyDown event of the control I have access to the KeyCode property of keyEventArgs
If the text in the textbox is selected and some other text is typed on top of it, the keyCodes that I am getting in the KeyDown event are different each time and in the KeyPress event I get the actual value.
For ex: If the textbox has value 1234 and now I select 1234 and type 5 on top of it, I want to to be able to know in any of the events by some key combination that the old value 1234 is gone and the new value of the textbox is 5.