C# 将System.Windows.Forms.Keys转换为Win32 VK_*系统

C# 将System.Windows.Forms.Keys转换为Win32 VK_*系统,c#,win32gui,C#,Win32gui,是否存在从System.Windows.Forms.Keys到Win32 VK_*系统的预先存在的转换器?我看到VK_控件是0x11,而System.Windows.Forms.Keys.CONTROL是131072。(System.Windows.Forms.Keys.ControlKey为17。)对于WPF密钥枚举,有一个类 Winforms Keys枚举与Win32 VK_*值具有相同的整数值。FYI。17是十六进制中的0x11。

是否存在从System.Windows.Forms.Keys到Win32 VK_*系统的预先存在的转换器?我看到VK_控件是0x11,而System.Windows.Forms.Keys.CONTROL是131072。(System.Windows.Forms.Keys.ControlKey为17。)

对于WPF密钥枚举,有一个类


Winforms Keys枚举与Win32 VK_*值具有相同的整数值。

FYI。17是十六进制中的0x11。