public const int WM_KEYDOWN = 0x0100;//按键消息 public const int WM_SYSKEYDOWN = 0x0104;//快捷键或系统命令键的消息 protected override bool ProcessCmdKey(ref Message msg, Keys keyData) {if ((msg.Msg == WM_KEYDOWN) || (msg.Msg == WM_SYSKEYDOWN)) { /// } return base.ProcessCmdKey(ref msg, keyData); }