private void FormMain_Deactivate(object sender, EventArgs e) { BindHotKey.UnregisterHotKey(Handle, 111); BindHotKey.UnregisterHotKey(Handle, 112); BindHotKey.UnregisterHotKey(Handle, 113); BindHotKey.UnregisterHotKey(Handle, 114); }
private void FormMain_Activated(object sender, EventArgs e) { BindHotKey.RegisterHotKey(Handle, 111, BindHotKey.KeyModifiers.Ctrl, (uint)Keys.X); BindHotKey.RegisterHotKey(Handle, 112, BindHotKey.KeyModifiers.Ctrl, (uint)Keys.C); BindHotKey.RegisterHotKey(Handle, 113, BindHotKey.KeyModifiers.Ctrl, (uint)Keys.V); BindHotKey.RegisterHotKey(Handle, 114, BindHotKey.KeyModifiers.None, (uint)Keys.Delete); }