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.
Hi Andrew,
maybe you have a CancelButton set for the form? Or another control that also uses an ESC accelerator?
Best regards
Frank
Please login first to submit.