OpenTween.Win32Api.UnregisterGlobalHotKey C# (CSharp) Method

UnregisterGlobalHotKey() public static method

public static UnregisterGlobalHotKey ( ushort hotkeyID, Form targetForm ) : void
hotkeyID ushort
targetForm System.Windows.Forms.Form
return void
        public static void UnregisterGlobalHotKey(ushort hotkeyID, Form targetForm)
        {
            if (hotkeyID != 0)
            {
                UnregisterHotKey(targetForm.Handle, hotkeyID);
                // clean up the atom list
                GlobalDeleteAtom(hotkeyID);
                hotkeyID = 0;
            }
        }

Usage Example

 public void UnregisterAllOriginalHotkey()
 {
     foreach (ushort hotkeyId in this._hotkeyID.Keys)
     {
         Win32Api.UnregisterGlobalHotKey(hotkeyId, this._targetForm);
     }
     this._hotkeyID.Clear();
 }