Ejemplo n.º 1
0
        public bool Register(ModifierKeys modifierKey, Keys key, HotKeyEventHandler hotKeyEventHandler)
        {
            ushort id = GlobalAtom.Add(this.GetHotKeyName(modifierKey, key));

            if (HotKeyManager.RegisterHotKey(this.Owner.Handle, id, (uint)modifierKey, (uint)key))
            {
                this.HotKeyTable.Add(id, hotKeyEventHandler);
                return(true);
            }
            else
            {
                return(false);
            }
        }