Send keystrokes to TextBox
        Posted  
        
            by tanascius
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by tanascius
        
        
        
        Published on 2009-04-15T21:34:44Z
        Indexed on 
            2010/05/31
            1:02 UTC
        
        
        Read the original article
        Hit count: 361
        
c#
I have a derived TextBox where I intercept the userinput to manipulate it. However I have to preserve the original typed input. So my idea was to hold an inner TextBox within my derived class and send the user's input to that TextBox before manipulating it.
The reason for this approach is that I do not want to take care of all this special actions like: typing something, ctrl+a, [del], type something else, [backspace] and so on ...
However I do not know how to send a single keystroke (keycode, ascii, char) to a TextBox. Maybe you have another idea without an inner TextBox at all? Thank you!
© Stack Overflow or respective owner