【问题标题】:Converting System.Windows.Forms.Keys to the Win32 VK_* system将 System.Windows.Forms.Keys 转换为 Win32 VK_* 系统
【发布时间】:2015-08-23 23:40:33
【问题描述】:

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

【问题讨论】:

  • 仅供参考。 17 是十六进制的 0x11。

标签: c# win32gui


【解决方案1】:

对于 WPF Key 枚举,有 KeyInterop 类。

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

【讨论】:

    猜你喜欢
    • 2010-11-12
    • 2011-01-31
    • 1970-01-01
    • 1970-01-01
    • 2010-10-07
    • 2015-09-10
    • 1970-01-01
    • 2022-07-02
    • 1970-01-01
    相关资源
    最近更新 更多