日期:2014-05-18 浏览次数:20750 次
public partial class frmJS : 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.Insert: break; case Keys.Enter: return true; break; } } return false; }