예제 #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();
 }
예제 #2
0
 private void exitItem_Click(object sender, EventArgs e)
 {
     WindowsShell.UnregisterHotKey(this);
     Application.Exit();
 }
예제 #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);
        }