使用C#设置全局热键

使用C#设置全局热键

当我的程序不在焦点时,我需要捕捉一个关键的按键。(.)克特+ALT+J)并在我的程序中触发一个事件。

到目前为止,我发现这个dll似乎是正确的路径“

[DllImport("user32.dll")]private static extern int RegisterHotKey(IntPtr hwnd, int id,int fsModifiers, int vk);[DllImport("user32.dll")] private static extern int UnregisterHotKey(IntPtr hwnd, int id);



holdtom
浏览 714回答 2
2回答
打开App,查看更多内容
随时随地看视频慕课网APP