<tfoot id='rRYRX'></tfoot>

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

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

      1. 最小化应用程序时捕获媒体密钥

        时间:2023-07-26
          <legend id='m9wOl'><style id='m9wOl'><dir id='m9wOl'><q id='m9wOl'></q></dir></style></legend>

          • <bdo id='m9wOl'></bdo><ul id='m9wOl'></ul>

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

                <tfoot id='m9wOl'></tfoot>

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

                  本文介绍了最小化应用程序时捕获媒体密钥的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我想为我正在开发的媒体播放器提供一个选项,以使媒体键即使在最小化时也能正常工作.在没有焦点的情况下在 C# 中捕获和处理这些关键事件的最佳方法是什么?有没有可能?

                  I want to provide an option with a media player I'm working on for the media keys to work even when it's minimized. What's the best way to capture and process those key events in C# without having focus? Is it even possible?

                  推荐答案

                  我不认为有一个简单的方法可以做到这一点,但 这个(使用窗口消息在 C# 中实现全局系统挂钩) 项目可能会有所帮助.我在下面添加了代码

                  I don't think that there is an easy way to do this but this (Using Window Messages to Implement Global System Hooks in C#) project may help. I added below code

                      _GlobalHooks.Keyboard.KeyboardEvent += (w, l) => 
                      {
                            this.LblMouse.Text = "KEY: " + w.ToInt32().ToString("X8") + " " + l.ToInt32().ToString("X8");
                      };
                      _GlobalHooks.Keyboard.Start();
                  

                  到 GlobalHookTest 的 Form1 的构造函数,并且能够监控所有的键盘事件.

                  to the constructor of Form1 of GlobalHookTest and was able to monitor all the keyboard events.

                  这篇关于最小化应用程序时捕获媒体密钥的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:在另一个应用程序中模拟按键和按键释放? 下一篇:在 c# (wpf) 中捕获 windows 键

                  相关文章

                  <tfoot id='C4fGH'></tfoot>

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

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