Exemplo n.º 1
0
 private void MainClass_FormClosing(object sender, FormClosingEventArgs e)
 {
     if (e.CloseReason == CloseReason.UserClosing)
     {
         e.Cancel = true;
     }
     else
     {
         try
         {
             WindowsShell.UnregisterHotKey(this);
         }
         catch {}
         return;
     }
     Hide();
 }
Exemplo n.º 2
0
 private void exitItem_Click(object sender, EventArgs e)
 {
     WindowsShell.UnregisterHotKey(this);
     Application.Exit();
 }
Exemplo n.º 3
0
        private void MainClass_Load(object sender, EventArgs e)
        {
            const Keys k = Keys.R | Keys.Control | Keys.Alt | Keys.Shift;

            WindowsShell.RegisterHotKey(this, k);
        }