private void UnsetHotkey() { Win32.UnregisterHotKey(this.Handle, (int)hotkey); btnHotkeyRemove.Enabled = false; }
private void SetHotkey() { txtHotkey.Text = KeysConverter.Convert(hotkey); Win32.RegisterHotKey(this.Handle, (int)hotkey, (uint)hotkeyNodifiers, (uint)(hotkey & Keys.KeyCode)); btnHotkeyRemove.Enabled = true; }