Windows Mobile: Hide StartButton in WinMo 6.5.x

Here is a very short tip based on a finding at xda-developers.com

See also here for how to hide the Start and Done button temporary.

For kiosk mode applications you dont want the user access the device settings or the start menu and all the programs and games accessible from there. One step to this kiosk mode is disabling the Start Button, the button that opens a menu to access programs and settings.

In versions of windows mobile before 6.5.3, you could disable access to the start button by subclassing HHTaskbar and discard clicks in the Start button area or simply disable the whole HHTaskbar window.

Now, with windows mobile 6.5.3 the start button is part of the menu bar and no longer part of the taskbar (which is now called MenuBar). To hide the start button on a windows Mobile 6.5.x device you can use following registry change:

[HKEY_LOCAL_MACHINE\Software\Microsoft\Shell\BubbleTiles]
"TextModeEnabled"=dword:00000001
"HardwareStartKeyEnabled"=dword:00000001
"HardwareDoneKeyEnabled"=dword:00000001

With this change the “MenuBar” will no longer show the Start Button graphic nor the Done button, Windows Mobile will no longer decorate the menu texts . Only two menu entries will now show on bottom of the today screen.

TextModeEnabled switches the display of soft menu entries from the default graphic tiles display to a text only display as it was and is in windows mobile 6.1.

HardwareStartKeyEnabled controls the display of the Start button (the big windows start symbol on the left of the soft menu). If you change to enabled (0x01) you dont get a start button and have to use a key on your keypad to launch the start screen!

HardwareDoneButton controls the display of the Done button at the right of the menu bar (the big (X)). When enabled, you have no chance to close apps that do not have an exit option in there menu, except you have a key on on your keyboard assigned to the Done function! Done now not only hides an app, with winmo 6.5 the app is closed and removed from memory now.

The Start entry at top left corner remains there but is only an indicator.

NO more Start Button, No more Done (X) Button

When you reboot the device, the change will be applied and you will see the Today screen with two menu shortcuts in the menubar at the bottom. On a prof. device this may be (Phone) and (Contacts). These buttons are also called SoftKeys and you can change there behaviour using the registry:

[HKLM\Software\Microsoft\CHome\SK1URL]
                "Open"= <handling app>
[HKEY_CURRENT_USER\SOFTWARE\Microsoft\Today\Keys\112]
                @="<SK label>"
                "Open"= <handling app>

(use SK2 for the second softkey)

So you may use these SoftKeys to enable the user to start your Kios application.

You should be aware of that if you dont have a key assigned to VK_LWIN (the Win key), you will never be able to switch to the Start Menu or now called Home Screen!

If an application is started and does not have a Exit menu, you will not be able to get back to the today screen. If you disable the TitleBar (HHTaskbar) you will also not be able to open any of the settings and informations available thru the TitleBar (ie battery status, clock settings, volume settings).

The TitleBar normally will get a “Start Menu” entry to the left. But with TextmodeEnabled=1 this will not be the case! So no way back to Today Screen and no way to get to the Start Menu with all the programs or the Home Screen.

Happy kiosk mode coding.

28 Comments

  1. redwolf2222 says:

    Nice one, but my solution was to winproc the ToolbarWindow32 control which has the close and start button on it. So there is no device reset nessessary to enable the registry settings, no optic is touched. If the start button is pressed the window message LBUTTONDOWN ist intercepted. If the mouseposition is above the start or close button the event is not passed through. The following code workes on Windows CE, Windows Mobile > 16;

    ….

    ADMIN comment:

    code removed as two other comments with the lengthy code.

    I will check this and see

    Josef

  2. admin says:

    I took your idea and wrote another article about how to use subclassing to disable Start and Close button:
    http://www.hjgode.de/wp/2010/11/18/mobile-development-disable-windows-mobile-6-5-start-and-close-button/

  3. stitchwalk says:

    hi///….

    can we hide the start button on a windows Mobile 6.1 device….possible or not??? please help….i have search every where but can’t fine it….
    1 more…..
    can registry disable softkey on blackstone (answer, home, back and DLL)?????

  4. admin says:

    Hi

    you can do whatever you want with the start button as soon as you have the window handle. It is just a matter of subclassing.

    Most of kiosk mode apps are full screen and so the start button on the screen does not matter.

    To disable the ‘soft’ keys, you may use AllKeys(TRUE) in your app or play with my “Free the function keys”. The latter uses unregisterHotkeys() API. All the softkeys are implemented using function key codes (F1, F2 and so on). But this is basic stuff and you should be aware of this when you are trying to make a kiosk mode app.

    regards

    Josef

  5. alfaking says:

    hello,
    this code is not working for me.
    I’ve added the 3 keys in the registry of my Motorla MC65, but I have no answers at all…

    what’s wrong ?

  6. admin says:

    Hi alfaking

    a) either you made the wrong registry entries (a typo or wrong reg type)

    b) despite from that, the reg keys should already exist and not needed to be created.

    c) you are not running Windows Mobile 6.5.3 or now called Windows Embedded Handheld 6.5.3 (WEH) on your device

    d) possibly motorola/symbol decided to not support the entries in there WEH build for this device

    sorry

    Josef

  7. alfaking says:

    oooooops, I’m really really sorry.
    after a reboot, it works perfectly now ! wow !!!!

    one more help….
    I need to do this for 15 different pdas…
    any idea on how to make this operation automatic ?
    I guess I should write a small application that writes the keys in the registry or something similar…
    I’m sure the reg keys were not there before 😉

  8. admin says:

    You may use the techique described here: http://www.hjgode.de/dev/installer/index.htm

    You need OCP WinCE CabManager (30 day trial OK) to follow the article

  9. Sushi says:

    This seems like a lot of work and has potential for locking out the device. The winproc process is definitely a lot of work and the menu bar is still there taking up valuable screen realestate. Plus the menu bar is still displayed, but is just non functioning.

    I simply deleted the menu from the window and replaced it with buttons. The window state is set to maiximized. When the application runs, now it functions like on WM 6.5.1 – no start button, no close button and no menu and the application window takes up the entire screen (kiosk). We have an admin function in the application that allows an administrator with credentials to exit the application and access the device for maintenance/trouble shooting. Since the registry hasn’t been changed, device maintenance can be performed easily.

  10. admin says:

    @sushi

    a) this is a very simple solution and can be done easily. Just change the registry and reboot.

    b) the menu is still usable and working. Only the Start and Close icons are removed.

    c) yes, there are many ways to get a kiosk mode app. If one does not need a working menu bar, he/she can start a fullscreen approach without any OS driven menu bar.

    regards

    Josef

  11. Praveen says:

    Hi,
    I am trying to hook an event to the task bar in windows mobile 6.5.3, So when the user clicks on the top taskbar, I should get an event, i am not able to get it, Can you please help

    Regards,
    Praveen.N

  12. admin says:

    I have some hook for the bottom bar: http://www.hjgode.de/wp/2011/03/08/mobile-development-subclassing-the-camera-view-cameracapturedialog-shcameracapture/

    But actually I dont know the class name of the top bar.

    You have to find the class name of the top bar (ie using zDump or simply RemoteSpy included with VS. Then you can use the above code to catch click events on the top bar.

    regards

    Josef

  13. praveen says:

    Hi.
    We tried to find the class of top toolbar using spy++ and tried to subclass it as mentioned but we were not successfull. One more method was we tried to enum all the windows and sub class it but with less success
    regards
    praveen

  14. admin says:

    hello praveen

    the class name of the top bar on windows mobile 6.5.3 is “HHTaskbar”. The taskbar can simply locked unlocked by using the following snippet:
    %<----------------------------------------- long LockTaskbar(bool lockIt) { HWND hWndTb; HRESULT hr; bool enable; enable = !lockIt; hWndTb = FindWindow(L"HHTASKBAR", NULL); if (hWndTb != NULL) { hr = EnableWindow(hWndTb, enable); UpdateWindow(hWndTb); return 0; // no error } else return -1; //error window not found } %<----------------------------------------- regards Josef

  15. praveen says:

    Hi joseph,
    Thanks for the reply. We had tried this earlier. When we try to subclass the “HHTASKBAR”. We are not getting the message (wndproc) on clicking of the top toolbar.
    Yes using the same piece of code we were able to hide/unhide and enable or disable the top toolbar. But we are not getting messages on subclassing

    regards
    praveen

  16. admin says:

    MS changed the memory model and now the processes do not any more share the same 2GB address space (starting with WinMo6).

    Subclassing the HHTaskBar windows seems to work only up to Windows Mobile 5.

    Possibly you can inject a DLL, but how would you then intercept messages from your main code?

    regards

    Josef

  17. praveen says:

    Can you please tell us how to inject the dll.
    The exe will be in background. Before this injecting dll concept we thought that when the user clicks on the taskbar. Exe will get the message(as it would have hooked for the click event on taskbar.) and bring the exe foreground.

  18. […] to 0 to hopefully re-enable the start menu instead of the key having a value of 1 as described here to disable the start menu which is how it comes when I flash the build. I could not find a specific […]

  19. […] The first article is about the Windows Start and Done Icon in menu bar and about fullscreen. You may already know, how to hide the start and done icon permanently from a Windows Embedded Handheld (Windows Mobile 6.5.3) device: Link […]

  20. Phil says:

    Hi,

    Thanks for the article. I am looking for the solution how can I disable the Start and Done buttons. I really don’t want to hide them. I want both buttons to be displayed, but they will not do anything if clicking on those buttons.

    thanks.

  21. admin says:

    See here http://www.hjgode.de/wp/2010/11/18/mobile-development-disable-windows-mobile-6-5-start-and-close-button/ for a post about subclassing to ignore clicks on the Start and OK/Close Symbol

  22. Vidya says:

    Hello,

    I need the steps to disable/remove the menu shortcuts in the menubar at the bottom i.e. Phone and Contacts. Please suggest how to use the below registries.

    [HKLM\Software\Microsoft\CHome\SK1URL]
    “Open”=
    [HKEY_CURRENT_USER\SOFTWARE\Microsoft\Today\Keys\112]
    @=””
    “Open”=

    In CHome, I don’t see SK1URL and under Today there is no Keys\112 registry. DO we need to create this?
    What value to be specified for ?

    Please guide.

  23. josef says:

    Hello

    this post is not about the menu tiles.

    You can assign the menu tiles on today screen to different applications, but I did not yet see a request to disable them completely (although this might be possible looking for the right window and disable/hide it). I have seen people assign the home screen menu tiles to there kiosk mode apps.

    Sorry

    Josef

  24. […] if a registry of a WEH device says 'Hardware finished pivotal available' there will be no Close or OK symbol for any new window: http://www.hjgode.de/wp/2010/10/11/windows-mobile-hide-startbutton-in-winmo-6-5-x/ […]

  25. Lazer says:

    Subject: Start & Done/Close buttons on the Title/Task bar

    In WM6.5.3 the Start & Close buttons were moved from the Task Bar to the Menu Bar & this is a problem for us as follows,

    Our in-house Software Programmers developed 2 robust Mobile Application that’s being used with more than 200 Symbol MC70 & MC75 for Production, Processing & Shipping,

    We are looking to get more devices but the newer ones are loaded with WM6.5.3, In many of the forms in our application the bottom/Menu Bar was removed to gain more room and there is no Back/Cancel/X button embedded in the form the X button from the Task Bar is used so now since in WM6.5.3 the buttons were removed there is no way to Closed/Go Back from those forms,

    Is there a way to put back the Start & Done button to the Top Task/Title Bar?

  26. josef says:

    Hello Lazer

    there is no way to get the (X) button into the top bar. AFAIK there is no such API.

    I would create a small tool that adds a window with (X) or (back) to the top bar. The window or button can then be clicked and should send a WM_Close to the active foreground window. This way it simualtes what the (x) in the menu bar does.

    Or you assign a key to send WM_Close/WM_Hide to the foreground window.

    ~Josef

  27. Lazer says:

    Hi Josef

    Thanks for your reply, It’s an excellent idea,

    Be well Lazer

  28. Ganesh Shinde says:

    please give the details of,
    HWND hTaskBar=FindWindow(L”HHTaskBar”,L””);

Leave a Reply