1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
| 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: this.Close(); break; } } return false; }
|