//直接复制此代码到FORM代码下面即可 protected override bool ProcessCmdKey(ref System.Windows.Forms.Message msg, System.Windows.Forms.Keys keyData) //激活回车键 { int WM_KEYDOWN = 256; int WM_SYSKEYDOWN = 260; if (msg.Msg == WM_KEYDOWN | msg.Msg == WM_SYSKEYDOWN) { switch (keyData) { case Keys.Escape: bTryLineDraw = false; break; default: break; } } return false; }
搜索
复制