<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#如何将虚拟键码转换为字符?

        时间:2023-05-20

        <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#如何将虚拟键码转换为字符?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:在 C# 中将 char 转换为 int 下一篇:为什么没有像 String.Empty 这样的 Char.Empty?

                  相关文章

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

                    1. <legend id='KKOuk'><style id='KKOuk'><dir id='KKOuk'><q id='KKOuk'></q></dir></style></legend>
                    2. <small id='KKOuk'></small><noframes id='KKOuk'>

                    3. <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>
                    4. <tfoot id='KKOuk'></tfoot>