我想本地化VirtualKeyforControl。目前有这样的代码:usingWindows.System;varmessage="Press"+VirtualKey.Control.ToString()+"+Dfordeletion!";是否有一个API可以用来实现以下功能?按Control+D进行删除!(在英文系统上)按Steuerung+D删除!(在德国系统上) 最佳答案 由于VirtualKey是一个枚举,不能直接翻译枚举中的成员,但可以作为资源文件的key,构建本地化系统:我关注了this在Windows8.1应用程序上
我正在尝试使用user32.dll中的ToUnicodeEx函数将virtualKey转换为unicode。根据文档,如果成功,此方法应返回1个或多个。在我的例子中,它总是返回0。procGetKeyboardState=user32.NewProc("GetKeyboardState")procMapVirtualKey=user32.NewProc("MapVirtualKeyA")procToUnicodeEx=user32.NewProc("ToUnicodeEx")...funcgetKeyboardState(keyboardState*uint16)(lenint32,e
我正在尝试使用user32.dll中的ToUnicodeEx函数将virtualKey转换为unicode。根据文档,如果成功,此方法应返回1个或多个。在我的例子中,它总是返回0。procGetKeyboardState=user32.NewProc("GetKeyboardState")procMapVirtualKey=user32.NewProc("MapVirtualKeyA")procToUnicodeEx=user32.NewProc("ToUnicodeEx")...funcgetKeyboardState(keyboardState*uint16)(lenint32,e