Posts tagged ‘HHTaskbar’

Windows Mobile: CF how to catch F1 and F2 in WEH

Before WEH and Windows Mobile 6 it was easy to catch all keys including the function keys in a Compact Framework (CF) application, you simply had to use Allkeys(true) and Form.Keypreview=true.

Actually, with Windows Embedded Handheld (WEH) or Windows Mobile 6.5.3 the above will not work for the F1 and F2 key. There are simply no KeyDown and KeyUp events reaching your CF application.

Windows Mobile 6.1 demo

with IMessageFilter active, F1 and F2 can be captured

After removing IMessageFilter no F1 and F2 keys are being captured

With WEH Microsoft moved the Start button from the taskbar at top to the menu bar at bottom. Further on, the menu bar is now using graphic tiles to display the top menu, the Close and OK/Done option. The OK/Close button also moved from taskbar to menu bar. Additionally the menu bar is higher than in Windows Mobile 6.1. That leaves less space for your client window.

Due to the above changes in the UI, the window messages are routed in another unknown way and normally a CF application does not get F1 and F2 key messages. Possibly the CF main message queue gets notification messages but these are handled internally by the CF runtime, you only see the menus are working.

Continue reading ‘Windows Mobile: CF how to catch F1 and F2 in WEH’ »

Windows Mobile: Kiosk Mode Series, part 2

In the first part of this series I showed how to make your compact framework application full screen or remove the Start icon from the menu bar. Now we will take a look at the task bar.

The task bar is at the top of your screen (except for fullscreen applications) and shows valuable information like the connection status, battery status or the current time.

Not full screen, taskbar not locked

This is a kiosk mode risk. The user is able to click the symbols in the taskbar and gets a popup menu with some icons. These icons enable the user to change connection settings, power management settings and others. You propably do not want to allow the user to make changes to some or all of the possible changes.

For example, clicking on the phone or signal strength icon will bring up this dialog:

The user can then change connection settings and activate or deactivate radios. Possibly a source for a bunch of support calls, if the user accidently changes connection settings.

Continue reading ‘Windows Mobile: Kiosk Mode Series, part 2’ »

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

Continue reading ‘Windows Mobile: Hide StartButton in WinMo 6.5.x’ »

Mobile Development: Yet another kiosk mode library

Hello

here is another kiosk mode library. It supports disabling clicks/taps on start menu icon and opening the Windows Mobile start menu using the win key (VKLWIN). Additionally there is a function to disable the whole StartMenu bar and one to make a window fullscreen without Done and Close button (uses SHFullScreen).

The functions are implemented in a DLL, so you can easily use them from C/C++, the dot net compact framework (CSharp or VB.NET), Java and so on.

Here is a list of the functions exported by the DLL:

void __stdcall LockStartMenu(); // this will install the hook (subclass the taskbar window)
void __stdcall UnlockStartMenu();   // this will unhook TaskbarWindowProc from taskbar
void __stdcall LockStartBar();  // this disables the whole taskbar
void __stdcall UnlockStartBar();    // this enables the taskbar window
bool __stdcall Lockdown(TCHAR*);    // this will make the application with the window title fullscreen etc
bool __stdcall Unlockdown();    // this will 'normalize' the fullscreen window

I have included a deno application in C and .NET

The left shows normal window ce window and the right the same window after pressing the [Lockdown window].

Continue reading ‘Mobile Development: Yet another kiosk mode library’ »