简体   繁体   中英

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

To disable OK button I need to disable "VK_RWIN + VK_F6" which is a combination of 2 hex codes. 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).

Does the emulator you have running with your code in Visual Studio 2008 have a similar button?

If not, you may want to try to get some kind of Motorola SDK that supports your ES400 device.

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.

I don't have an ES400, so I can not say for certain that this would work.

屏幕截图

To capture all keys you better (and simplier) use AllKeys() API.

But even with AllKeys(TRUE) in place, compact framework runtim does not forward all key strokes. A good solution to that is the PreFilterMessage function of the OpenNetCF framework. See my article at 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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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