private void Form1_FormClosed(object sender, FormClosedEventArgs e) { HotKeyManager.UnregisterHotKey(hotKeyHandler); }
private void Form1_Load(object sender, EventArgs e) { hotKeyHandler = HotKeyManager.RegisterHotKey(Keys.F, KeyModifiers.Shift | KeyModifiers.Windows); HotKeyManager.HotKeyPressed += new EventHandler <HotKeyEventArgs>(HotKeyManager_HotKeyPressed); }