uses windows,menus; ..... //声明 HotKey_Key: Word; HotKey_Shift: Word; procedure WMHotKey(var msg : Tmessage); message WM_HOTKEY; ...... function ShiftStateToWord(Shift:TShiftState): Word; begin if ssShift in Shift then Result :=MOD_SHIFT else Result :…
重写DefWndProc事件 #region Window 消息捕获 const int WM_COPYDATA = 0x004A; public struct COPYDATASTRUCT { public IntPtr dwData; public int cbData; [MarshalAs(UnmanagedType.LPStr)] public string lpData; } [DllImport("user32")] public static extern bool C…