private txtCodePath_KeyPress ( object sender, KeyPressEventArgs e ) : void | ||
sender | object | |
e | KeyPressEventArgs | |
return | void |
private void txtCodePath_KeyPress(object sender, KeyPressEventArgs e)
{
if (e.KeyChar == (Char)System.Windows.Forms.Keys.Escape)
{
if (MessageBox.Show("Are you sure you wish to exit?", "Are you sure?", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
{
Application.Exit();
e.Handled = true;
}
}
}