将 System.Windows.Forms.Keys 转换为 Win32 VK_* 系统
Converting System.Windows.Forms.Keys to the Win32 VK_* system
是否有从 System.Windows.Forms.Keys 到 Win32 VK_* 系统的预先存在的转换器?我看到 VK_CONTROL 是 0x11 而 System.Windows.Forms.Keys.Control 是 131072。(System.Windows.Forms.Keys.ControlKey 是 17。)
对于 WPF 密钥枚举,有 KeyInterop class。
Winforms 键枚举具有与 Win32 VK_* 值相同的整数值。
是否有从 System.Windows.Forms.Keys 到 Win32 VK_* 系统的预先存在的转换器?我看到 VK_CONTROL 是 0x11 而 System.Windows.Forms.Keys.Control 是 131072。(System.Windows.Forms.Keys.ControlKey 是 17。)
对于 WPF 密钥枚举,有 KeyInterop class。
Winforms 键枚举具有与 Win32 VK_* 值相同的整数值。