首页  :: 新随笔  :: 联系 :: 管理

Mobile Development: Disable Windows Mobile 6.5 Start and Close Button

Posted on 2011-11-18 12:24  answer  阅读(356)  评论(0编辑  收藏  举报





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.


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.