protected override void WndProc(ref Message m) { if (m.Msg == WM_HOTKEY) { HotKey h = (HotKey)GCHandle.FromIntPtr(this.GetObject((int)m.WParam)).Target; if (h.HotKeyPressed != null) { h.HotKeyPressed(h, null); } } else { base.WndProc(ref m); } }