private static void UnregPrevHotkey(HotKeys.HotKeyCallBackHandler cb) { GlobalHotKey.HotKey prevHotKey; if (HotKeys.IsCallbackExists(cb, out prevHotKey)) { // unregister previous one HotKeys.UnRegist(prevHotKey); } }
private void btnUnregist_Click(object sender, EventArgs e) { h.UnRegist(this.Handle, CallBack); MessageBox.Show("卸载成功"); }