Mobile Development: Disable Windows Mobile 6.5 Start and Close Button

来自:http://www.hjgode.de/wp/2010/11/18/mobile-development-disable-windows-mobile-6-5-start-and-close-button/

Hello

here is one other way to write a kios mode .NET application using a technique called SubClassing. The idea was born by a comment of redwolf2222 on this blog about how to Hide Start and Close buttons on Windows Mobile 6.5 devices. Redwolf2222 also provided a code snippet. Unfortunately it was incomplete and so I wrote my own class.

Disable clicks on Start and Close button

The demo project shows one dialog with two check boxes and you can easily test the function. If “StartButton Disabled” or “Close Button disabled” is checked, you cannot ‘click’ the corresponding button any more:

You still ‘click’ the buttons but the subclassed window will not ‘execute’ your click. The buttons are part of the toolbar32 window which is a child of the menu_worker window. So first we have to follow the window tree.

 

Downloads
Visual Studion 2008 solution with demo project targeting Windows Mobile 6 SDK: DOWNLOAD:StartButtonHookWM65 VS2008 source code and demo project - (Hits: 702, size: 18.53 kB)

Thanks to redwolf2222 for the great idea.

原文地址:https://www.cnblogs.com/answer/p/2253924.html