Пример #1
0
 private void btnSair_KeyDown(object sender, KeyEventArgs e)
 {
     if (e.KeyCode == Keys.Escape)
     {
         DesejaSair frm = new DesejaSair();
         frm.ShowDialog();
     }
 }
Пример #2
0
        private void sairToolStripMenuItem_Click(object sender, EventArgs e)
        {
            DesejaSair frm = new DesejaSair();

            frm.ShowDialog();
        }