开发者

How to implement a Ctrl+C action in C#?

开发者 https://www.devze.com 2023-01-16 22:38 出处:网络
How can I implement a combination(Ctrl+C) key pressed action in c# ?? I need the application to press the key (Ctrl+C) when the user click a button ??

How can I implement a combination(Ctrl+C) key pressed action in c# ?? I need the application to press the key (Ctrl+C) when the user click a button ??

I don't want it to detect the key press, because I did that already. I need the application to perform 开发者_开发百科the Ctrl+C action when a button pressed, instead of pressing from the keyboard. Because I will use that for the Edit menu for my application ;)

Note: I just want it to do the Ctrl+C action, I don't want it to copy the text, because it's already done. Only I want is to press those key.

Thanks alot


You could use SendKeys class methods Send or SendWait

0

精彩评论

暂无评论...
验证码 换一张
取 消