Register hotkeys in .NET - combination of three/four keys
问题 I got stuck. Right now, I am using the following code to listen to hotkeys: [DllImport("user32.dll")] public static extern bool RegisterHotKey(IntPtr hWnd, int id, int fsModifiers, int vlc); [DllImport("user32.dll")] public static extern bool UnregisterHotKey(IntPtr hWnd, int id); protected override void WndProc(ref Message m) { if (m.Msg == 0x0312) { // whatever i need } base.WndProc(ref m); } and this function to register hotkey: Form1.RegisterHotKey(this.Handle, this.GetType().GetHashCode(