Esempio n. 1
0
 protected override bool ProcessCmdKey(ref Message msg, Keys keyData)
 {
     if (keyData == Keys.Escape)
     {
         Menu1 MyMenu1 = new Menu1();
         MyMenu1.ShowDialog();
         //Hide();
         return(true);
     }
     return(base.ProcessCmdKey(ref msg, keyData));
 }
Esempio n. 2
0
 protected override bool ProcessCmdKey(ref Message msg, Keys keyData) //To go to menu
 {
     if (keyData == Keys.Escape)                                      //if press esc
     {
         Menu1 MyMenu1 = new Menu1();
         MyMenu1.ShowDialog(); //show menu
         this.Hide();          //this window hide
         return(true);
     }
     return(base.ProcessCmdKey(ref msg, keyData));
 }