I am trying to send keys combination to another program like that:
// keydown ctrl
SendMessage(windowBracketsKeyListener, 0x100, (IntPtr)VK_CONTROL, (IntPtr)0x001D0001);
// keydown S
SendMessage(windowBracketsKeyListener, 0x100, (IntPtr)VK_S, (IntPtr)0x001F0001);
SendMessage(windowBracketsKeyListener, 0x102, (IntPtr)115, (IntPtr)0);
// keyup ctrl
SendMessage(windowBracketsKeyListener, 0x101, (IntPtr)VK_CONTROL, (IntPtr)0xC01D0001);
To the last line I have an error (look at the image below).
I send the same commands as in Spy++. So firstly I automatically tried to click CTRL+S on a window then checked what I get in Spy++ and wrote the same commands.
Error:
System.OverflowException: 'Arithmetic operation resulted in an overflow.'
- Okay, I use not Spy++, but Window Detective to be honest.