private void hk_button_Click(object sender, EventArgs e) { frm_Options o = new frm_Options(); o.ShowDialog(); if (globalHotKey != null) { globalHotKey.unhook(); } CreateGlobalHotkey(); }
private void panel3_MouseClick(object sender, MouseEventArgs e) { frm_Options o = new frm_Options(); o.ShowDialog(); // This check is probably not necessary, but there might be some weird // condition that causes globalHotKey to end up NULL if (globalHotKey != null) { globalHotKey.unhook(); } CreateGlobalHotkey(); }