private void FRMInitialSettings_KeyDown(object sender, KeyEventArgs e) { if (e.KeyCode == Keys.Escape) { BTNCancel.PerformClick(); } }
private void frmSetEngin_KeyDown(object sender, KeyEventArgs e) { switch (e.KeyData) { case Keys.F5: BtnOk.PerformClick(); break; case Keys.Escape: BTNCancel.PerformClick(); break; case Keys.F6: BtnTest.PerformClick(); break; } }