<bdo id='QT19p'></bdo><ul id='QT19p'></ul>
      <tfoot id='QT19p'></tfoot>
    1. <small id='QT19p'></small><noframes id='QT19p'>

      1. <legend id='QT19p'><style id='QT19p'><dir id='QT19p'><q id='QT19p'></q></dir></style></legend>
        <i id='QT19p'><tr id='QT19p'><dt id='QT19p'><q id='QT19p'><span id='QT19p'><b id='QT19p'><form id='QT19p'><ins id='QT19p'></ins><ul id='QT19p'></ul><sub id='QT19p'></sub></form><legend id='QT19p'></legend><bdo id='QT19p'><pre id='QT19p'><center id='QT19p'></center></pre></bdo></b><th id='QT19p'></th></span></q></dt></tr></i><div id='QT19p'><tfoot id='QT19p'></tfoot><dl id='QT19p'><fieldset id='QT19p'></fieldset></dl></div>

        C#如何将虚拟键码转换为字符?

        C# How to translate virtual keycode to char?(C#如何将虚拟键码转换为字符?)

        <small id='R9Ds8'></small><noframes id='R9Ds8'>

      2. <tfoot id='R9Ds8'></tfoot>
        • <i id='R9Ds8'><tr id='R9Ds8'><dt id='R9Ds8'><q id='R9Ds8'><span id='R9Ds8'><b id='R9Ds8'><form id='R9Ds8'><ins id='R9Ds8'></ins><ul id='R9Ds8'></ul><sub id='R9Ds8'></sub></form><legend id='R9Ds8'></legend><bdo id='R9Ds8'><pre id='R9Ds8'><center id='R9Ds8'></center></pre></bdo></b><th id='R9Ds8'></th></span></q></dt></tr></i><div id='R9Ds8'><tfoot id='R9Ds8'></tfoot><dl id='R9Ds8'><fieldset id='R9Ds8'></fieldset></dl></div>
              <tbody id='R9Ds8'></tbody>

                <bdo id='R9Ds8'></bdo><ul id='R9Ds8'></ul>
                  <legend id='R9Ds8'><style id='R9Ds8'><dir id='R9Ds8'><q id='R9Ds8'></q></dir></style></legend>

                1. 本文介绍了C#如何将虚拟键码转换为字符?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  限时送ChatGPT账号..

                  我正在尝试将虚拟键码映射到字符.

                  I am trying to map a virtual keycode to a char.

                  我的代码使用 ProcessCmdKey 来监听 WM_KEYDOWN,这使我可以访问所按下的键.例如,当我按下单引号时,我得到一个 222 的键,我希望将它映射到 keychar 39,它表示......你猜对了......单引号.

                  My code uses ProcessCmdKey to listen to WM_KEYDOWN which gives me access to the key pressed. For example, when I press single quote I get a key of 222 which I want to have it mapped to keychar 39 which represents... you guessed it... single quote.

                  我的开发环境是:- .net 框架 2.0- UserControl 放置在很多地方

                  My dev context is: - .net Framework 2.0 - UserControl placed in a lot of places

                  你知道问题的答案吗?

                  推荐答案

                  这不就是 System.Windows.Form.KeysConverter 类是为了什么?

                  Isn't that what the System.Windows.Form.KeysConverter class is for?

                  KeysConverter kc = new KeysConverter();
                  string keyChar = kc.ConvertToString(keyData);
                  

                  这篇关于C#如何将虚拟键码转换为字符?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  Force JsonConvert.SerializeXmlNode to serialize node value as an Integer or a Boolean(强制 JsonConvert.SerializeXmlNode 将节点值序列化为整数或布尔值)
                  Using JSON to Serialize/Deserialize TimeSpan(使用 JSON 序列化/反序列化 TimeSpan)
                  Could not determine JSON object type for type quot;Classquot;(无法确定类型“Class的 JSON 对象类型.)
                  How to deserialize a JSONP response (preferably with JsonTextReader and not a string)?(如何反序列化 JSONP 响应(最好使用 JsonTextReader 而不是字符串)?)
                  how to de-serialize JSON data in which Timestamp it-self contains fields?(如何反序列化时间戳本身包含字段的JSON数据?)
                  JSON.Net custom contract serialization and Collections(JSON.Net 自定义合约序列化和集合)

                      <bdo id='KKOuk'></bdo><ul id='KKOuk'></ul>

                          • <legend id='KKOuk'><style id='KKOuk'><dir id='KKOuk'><q id='KKOuk'></q></dir></style></legend>
                          • <small id='KKOuk'></small><noframes id='KKOuk'>

                          • <i id='KKOuk'><tr id='KKOuk'><dt id='KKOuk'><q id='KKOuk'><span id='KKOuk'><b id='KKOuk'><form id='KKOuk'><ins id='KKOuk'></ins><ul id='KKOuk'></ul><sub id='KKOuk'></sub></form><legend id='KKOuk'></legend><bdo id='KKOuk'><pre id='KKOuk'><center id='KKOuk'></center></pre></bdo></b><th id='KKOuk'></th></span></q></dt></tr></i><div id='KKOuk'><tfoot id='KKOuk'></tfoot><dl id='KKOuk'><fieldset id='KKOuk'></fieldset></dl></div>
                          • <tfoot id='KKOuk'></tfoot>
                              <tbody id='KKOuk'></tbody>