Accerator not firing on form

Answered
0
0

Are there any things that will interfere with an ESC key accelerator firing on a form? I am making most forms close by ESC doing this:

private void frmEditIssue_Accelerator(object sender, AcceleratorEventArgs e)
{
if (e.KeyCode == Keys.Escape)
{
RequestFormClose();
}
}

 

and registering the accelerator in the designer.

This is working on most forms, but not one of them — the event never fires.

The accelerator key IS present on the form at runtime.

 

 

  • You must to post comments
Best Answer
0
0

Hi Andrew,

maybe you have a CancelButton set for the form? Or another control that also uses an ESC accelerator?

Best regards
Frank

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.