Connect with Expertise | Find Experts, Get Answers, Share Insights

How do I format a string for the methis SendKeys method to emulate Ctrl-C?

DOSrelic's Avatar  
Join Date: Sep 2006
Location: Waipukurau New Zealand
Posts: 13
#1: Jan 5 '10
I have read this page
http://msdn.microsoft.com/en-us/libr...ys(VS.71).aspx but try as I might I cannot figure out how to do it. I tried many combinations but none of them have succeded, as far as I know. I should have had some text now in the ClipBoard with SendKeys.Send("{^(C)}"); but if I don't get an axception due to System.ArgumentException was unhandled. Message="Keyword \"^C\" is not valid." then it is still empty. Am I doing it wrong or am I not sending the keys to the right window with the SendKeys.Send("{^(C)}");? Your help will be invaluable, cheers.

Thanks & Best Regards
[DOSrelic]
¨`•._.®._.•´¨

Reply

Tags
send control+c in csharp