实施的WinForms键盘快捷键方法

重写ProcessCmdKey()方法是通用的解决方案
代码
protected override bool ProcessCmdKey(ref Message msg, Keys keyData)
{
if (keyData == (Keys.Control | Keys.F))
{
MessageBox.Show(
"What the Ctrl+F?"); return true;
}
return base.ProcessCmdKey(ref msg, keyData);
}
原文地址:https://www.cnblogs.com/strugglepcx/p/1869805.html