public HookGlobalHotkey(Form targetForm) { _targetForm = targetForm; _hotkeyID = new Dictionary<int, KeyEventValue>(); _targetForm.HandleCreated += this.OnHandleCreated; _targetForm.HandleDestroyed += this.OnHandleDestroyed; }