How to send Ctrl/Shift/Alt + Key combinations to an application window? (via SendMessage)
        Posted  
        
            by 
                user1792042
            
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by user1792042
        
        
        
        Published on 2012-11-02T17:36:46Z
        Indexed on 
            2012/11/17
            11:04 UTC
        
        
        Read the original article
        Hit count: 400
        
c#
|sendmessage
I can successfully send any single key message to an application, but don't know how to send combinations of keys (like Ctrl+F12, Shift+F1, Ctrl+R, etc..)
Tired doing this that way:
SendMessage(handle, WM_KEYDOWN, Keys.Control, 0);
SendMessage(handle, WM_KEYDOWN, Keys.F12, 0);
SendMessage(handle, WM_KEYUP, Keys.F12, 0);
SendMessage(handle, WM_KEYUP, Keys.Control, 0);
but this doen not seems to work.. (application act like only F12 is pressed, not Ctrl+F12)..
Any ideas how to make this work?
© Stack Overflow or respective owner