protected override void OnPreviewKeyDown(PreviewKeyDownEventArgs e) { if (e.KeyCode == Keys.Escape) this.Close(); base.OnPreviewKeyDown(e); }