A
A
Andr'U Sender2014-10-03 13:24:26
C++ / C#
Andr'U Sender, 2014-10-03 13:24:26

C# How to pass the key combination Ctrl+A, Shift+A to another application?

In general, the essence of the question is clear, the code does not transmit combinations, but only separately pressed keys, i.e. Ctrl+A doesn't work here :(

SetActiveWindow(ptr);            
            PostMessage(ptr, WM_SYSKEYDOWN, (int)Keys.ControlKey, 0);
            PostMessage(ptr, WM_SYSKEYDOWN, (int)Keys.A, 0);
            PostMessage(ptr, WM_SYSKEYUP, (int)Keys.ControlKey, 0);
            PostMessage(ptr, WM_SYSKEYUP, (int)Keys.A, 0);

Answer the question

In order to leave comments, you need to log in

1 answer(s)
G
GavriKos, 2014-10-03
@GavriKos

stackoverflow.com/questions/11384669/sending-right... - try as written here

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question