简体   繁体   English

在Windows Mobile 6.5.3中禁​​用SmartMinimize硬按钮/确定硬按钮

[英]Disable SmartMinimize Hard button/ OK hardbutton in windows mobile 6.5.3

I am not able to disable "OK" hardware button from my code. 我无法从代码中禁用“确定”硬件按钮。 To disable other buttons I am using 要禁用我正在使用的其他按钮

        private void DisableButton(IntPtr Handle, Int32 code)
        {
            UnregisterFunc1(KeyModifiers.Windows, code);
            RegisterHotKey(Handle, code, KeyModifiers.Windows, code);

        }

where code = hexa decimal codes from http://msdn.microsoft.com/en-us/library/bb431750.aspx 其中代码=来自http://msdn.microsoft.com/zh-cn/library/bb431750.aspx的十六进制代码

To disable OK button I need to disable "VK_RWIN + VK_F6" which is a combination of 2 hex codes. 要禁用“确定”按钮,我需要禁用“ VK_RWIN + VK_F6”,这是2个十六进制代码的组合。 Can some one please help me in achieving the same with the above mentioned method or any other method. 有人可以帮我用上述方法或任何其他方法实现相同的目的。

Note: I am using Motorola ES400 (if this helps in any way). 注意:我正在使用Motorola ES400(如果这样做有任何帮助)。

Does the emulator you have running with your code in Visual Studio 2008 have a similar button? 在Visual Studio 2008中使用代码运行的模拟器是否具有类似的按钮?

If not, you may want to try to get some kind of Motorola SDK that supports your ES400 device. 如果没有,您可能想要尝试获得某种支持您的ES400设备的Motorola SDK。

With that, you can double click the button in the designer and either disregard that input or write something to bypass it. 这样,您可以双击设计器中的按钮,然后忽略该输入或编写一些内容以绕过它。 There may also be a Key Down event you could write code for, which would work even better. 您可能还会为您编写代码的Key Down事件,这样做会更好。

I don't have an ES400, so I can not say for certain that this would work. 我没有ES400,因此无法确定这是否可行。

屏幕截图

To capture all keys you better (and simplier) use AllKeys() API. 要更好(更简单)地捕获所有键,请使用AllKeys()API。

But even with AllKeys(TRUE) in place, compact framework runtim does not forward all key strokes. 但是即使使用AllKeys(TRUE),紧凑的框架runtim也不会转发所有按键。 A good solution to that is the PreFilterMessage function of the OpenNetCF framework. 一个很好的解决方案是OpenNetCF框架的PreFilterMessage函数。 See my article at http://www.hjgode.de/wp/2012/09/20/windows-mobile-cf-how-to-catch-f1-and-f2-in-weh/ 请参阅我的文章, 网址http://www.hjgode.de/wp/2012/09/20/windows-mobile-cf-how-to-catch-f1-and-f2-in-weh/

With PreFilerMessage you should be able to catch the VK_RWIN+VK_F6 combination. 使用PreFilerMessage,您应该能够捕获VK_RWIN + VK_F6组合。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM