/// <summary> /// Unregisters the specified hotkey. /// </summary> /// <param name="id">Hotkey Id.</param> /// <returns>True if the hotkey was unregistered, otherwise false.</returns> public bool Unregister(int id) { // attempt to unregister the hotkey. bool result = UnregisterHotKey(m_ctrl.Handle, id); // remove the hotkey from the collection. if (result) { m_keys.RemoveId(id); } return(result); }
/// <summary> /// Unregisters the specified hotkey. /// </summary> /// <param name="id">Hotkey Id.</param> /// <returns>True if the hotkey was unregistered, otherwise false.</returns> public bool Unregister(int id) { bool result = false; try { // attempt to unregister the hotkey. result = UnregisterHotKey(m_ctrl.Handle, id); // remove the hotkey from the collection. if (result) { m_keys.RemoveId(id); } } catch (Exception) { } return(result); }