Exemplo n.º 1
0
 private void DialogForm_KeyDown(object sender, KeyEventArgs e)
 {
     if (e.KeyCode == Keys.Escape)
     {
         NoButton.PerformClick();
     }
     else if (e.KeyCode == Keys.F1)
     {
         YesButton.PerformClick();
     }
     else if (e.KeyCode == Keys.F2)
     {
         NoButton.PerformClick();
     }
     return;
 }