摘要:
只需将代码复制到所需窗体下即可。。。。。。。Winform 窗体捕获键盘鼠标事件protectedoverrideboolProcessCmdKey(refSystem.Windows.Forms.Messagemsg,System.Windows.Forms.KeyskeyData)//激活回车键{intWM_KEYDOWN=256;intWM_SYSKEYDOWN=260;if(msg.Msg==WM_KEYDOWN|msg.Msg==WM_SYSKEYDOWN){switch(keyData){caseKeys.Escape:if(MessageBox.Show("确定要退出么 阅读全文