private void MainClass_FormClosing(object sender, FormClosingEventArgs e) { if (e.CloseReason == CloseReason.UserClosing) { e.Cancel = true; Hide(); return; } WindowsShell.UnregisterHotKey(this); }
private void MainClass_Load(object sender, EventArgs e) { const Keys k = Keys.N | Keys.Control | Keys.Alt | Keys.Shift; WindowsShell.RegisterHotKey(this, k); }