Posts tagged ‘windows mobile’

Mobile Development: Move your Form

Although I do not yet know a use case for this, here comes some code to make your smartdevice forms being moveable.

As default, Windows forms on mobile devices are created always as maximized forms. There may be situations, where you need a moveable form. The trick in compact framework is to use SetWindowLong with WS_CAPTION style and apply that to your form.

  

To enable you to experminet more with Window Styles there is another demo enabling to check all known window stlyes with a form. Be warned, setting WS_DISABLED or some other styles will make your form inaccessible.

Continue reading ‘Mobile Development: Move your Form’ »

Mobile Development: Watch the power of your device, think green

This is a very simple application to show the values of GetSystemPowerStatusEx2 in live view.

That enables you to see how much power is drawn of the battery if you switch WiFi on or off for example.

  

On industrial devices you can also check the power consumption of special modules like a barcode scanner.

Continue reading ‘Mobile Development: Watch the power of your device, think green’ »

Windows Mobile: redirect function keys into Internet Explorer Mobile browser

iHookIE6

this small tool enables you to use Function keys within Internet Explorer Mobile (IEM) web sites.

Normally, most function keys are catched and used by the OS (GWES) to perfom special actions like menu softkeys, phone call, end phone, volume up, volume down and more.

Using a keyboard hook we can catch the function key presses, or better say WM_KEYDOWN and WM_KEYUP messages before the OS can catch them.

One challenge was to find the window that processes normal key presses. The keyboard windows messages are not send to the top level window. Using the Remote Spy Tool I found the Window inside Internet Explorer window that finally processes keyboard messages. Now the tool can hook the keyboard, catch F key presses (F1 to F24) and send them directly to the browser window (class name = “Internet Explorer_Server”). The tool simply uses FindWindow and GetWindow to locate the window handle of this window and then does a PostMessage with WM_KEYDOWN and WM_KEYUP directly to the browser window.

Continue reading ‘Windows Mobile: redirect function keys into Internet Explorer Mobile browser’ »

Windows Mobile: disable touch input

Hello

sometimes you might want to ‘lock’ the screen, better say: disable touch input. For example, if you put the device in a pocket, to avoid accidentally tapped screen elements.

Continue reading ‘Windows Mobile: disable touch input’ »