Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如果我使用 win32 调用拦截按键,我现在有一个键码。有没有办法将其转换为 System.Windows.Forms.Keys 值?
使用KeyInterop.KeyFromVirtualKey().
KeyInterop.KeyFromVirtualKey()
System.Windows.Forms.Keys 枚举的整数值与 Win32 调用的值匹配。
Keys keyData = (Keys)rawWin32KeyCode;