protected void OnWM_GETDLGCODE(ref Message m) { // We want to the Form to provide all keyboard input to us m.Result = (IntPtr)Win32.DialogCodes.DLGC_WANTALLKEYS; }