当有人使用键盘快捷键时如何运行方法,如Ctrl + G? [英] How Can I Run A Method When Someone Used A Keyboard Shortcut Like Ctrl+G ?

查看:85
本文介绍了当有人使用键盘快捷键时如何运行方法,如Ctrl + G?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨每个身体

i在方法中有一些代码,我希望我的应用程序在Windows启动运行并进入系统尝试所以我想如果有人按下Ctrl + G我的方法在后台运行并在Windows剪贴板中粘贴一些文本。我不知道怎么做这个,我搜索所有的互联网和很多代码,但我没有成功,

我的应用程序是一个Windows窗体c#。

请帮忙,如果你知道的话,

提前感谢

hi every body
i have some code in a method and i want my app run in windows start-up and go to system try so I want if someone pressed Ctrl+G my method run in background and paste some text in windows clipboard. bu i don't know how to do like this, i search all the internet and fine a lot of code but i was unsuccessful,
my app is a windows form in c#.
please help if you know,
thanks in advance

推荐答案

首先在谷歌上打我:

简单的C#全局低级键盘挂钩 [ ^ ]



试一试......
First hit on Google for me:
A Simple C# Global Low Level Keyboard Hook[^]

Give it a try...


这篇关于当有人使用键盘快捷键时如何运行方法,如Ctrl + G?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆