|
-
Mar 17th, 2010, 10:15 PM
#1
Thread Starter
Fanatic Member
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
-
Mar 18th, 2010, 08:19 AM
#2
Addicted Member
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");
If someone has helped you, please make sure to rate them. 
-
Mar 18th, 2010, 01:19 PM
#3
Addicted Member
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
If i gave you good code/help, then dont forget to RATE
Dont forget to mark your thread [Resolved] with the tools from the menu above...
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|