捕获按Ctrl + Shift + P在C#Windows键行程窗体应用程序 [英] Capturing Ctrl + Shift + P key stroke in a C# Windows Forms application
本文介绍了捕获按Ctrl + Shift + P在C#Windows键行程窗体应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
可能重复:结果
捕获组合键事件Windows窗体应用程序
我需要执行当一个特定的操作(<大骨节病>控制骨节病> + <大骨节病>移骨节病> + <大骨节病> P 骨节病>)键被按下。
I need to perform a particular operation when (Ctrl + Shift + P) keys are pressed.
我怎样才能抓住这我 C#应用?
推荐答案
我个人认为这是最简单的方法。
Personally I think this is the simplest way.
private void Form1_KeyDown(object sender, KeyEventArgs e)
{
if (e.Control && e.Shift && e.KeyCode == Keys.P)
{
MessageBox.Show("Hello");
}
}
这篇关于捕获按Ctrl + Shift + P在C#Windows键行程窗体应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文