Simulate BackSpace
C#
2
Posts
2
Posters
0
Views
1
Watching
-
Hy, How can I simulate a BackSpace on a RichTextBox in OnKeyPress or OnKeyDown methods? thx
Write the following code in the RichTextBox's OnKeyPress or OnKeyDown event handler:
SendKeys.Send("{BACKSPACE}");
And that's it. If you don't want the user to write text in the RichTextBox, just set it's property ReadOnly to true instead of doing this. -- modified at 11:16 Thursday 27th September, 2007
Virtual1ty
"Any fool can learn from his own mistakes, but a wise man learns from mistakes of others"