best way to send Ctrl+C to the os?
I'm working on a program that i need to copy and paste while not in focus
I have the code to register global hotkeys (ctrl+1 ctrl+2 etc) but i want to trigger a copy or paste when the hotkey is triggered
I'm not sure what the best way is to send a keystroke to the os is
any ideas or hits?
Thanks so much
Re: best way to send Ctrl+C to the os?
What exactly are you trying to do? Are you trying to send or receive from the Clipboard?
Code:
String TextFromClipboard = Clipboard.GetText();
Clipboard.SetText("Clipboard Text");
Re: best way to send Ctrl+C to the os?
To send a keystroke use, 'SendKeys'
Send the keystroke ctrl+c
For more information about SendKeys checkout;
link