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;
}
}
}