Posts tagged ‘taskbar’

MobileDevelopment: Using shFullScreen API to show hide Start icon

Uuups, sometimes we are looking for a way to do simple things and do not remeber how easy it was.

Question: How can one hide/show the start icon in taskbar of Windows Mobile 6.1 (and before)?

Answer: Use the API provided by Microsoft for this: SHFullScreen! No need to use FindWindow and subclass, very simple use.

Ah, remeber that this will NOT work on Windows Enbedded Handheld 6.5.3 or Windows Mobile 6.5.3 or whatever you call it. The API will simply not do it’s work.

Here is a C# example for SHFullScreen usage.

Continue reading ‘MobileDevelopment: Using shFullScreen API to show hide Start icon’ »

Mobile Development: showFullScreen, a tool to change foreign windows attributes

Hello

attached is a small tool to alter foreign windows. You can show/hide, enable/disable and resize windows.

One example is to disable the taskbar window: showFullScreen -disable -class “HHTASKBAR”

How to launch

Here is a list of possible arguments:

Arguments:                default          meaning
-class                    ""               class name of window to change, optional
-title                    ""               title of window to change, optional
            at least -class or -title must be used to change a window

-fullscreen               false            make window fullscreen
-maximized                false            make window normal size

-show                     no change        make window visible
-hide                     no change        make window invisible

-enable                   no change        enable window
-disable                  no change        disable window

-list                    -                 list windows into file

Examples

And here some more examples for usage:

Enable IE6 soft menu button:    -class "IE6on6SoftKeyBar" -enable
Disable IE6 soft menu button:    -class "IE6on6SoftKeyBar" -disable

Enable taskbar:        -class "HHTASKBAR" -enable
Disable taskbar:    -class "HHTASKBAR" -disable

make win fullscreen: -class "WFIcaClient" -fullscreen

List windows (like remote spy does)

Please use -list argument, to get a list of running windows:

Continue reading ‘Mobile Development: showFullScreen, a tool to change foreign windows attributes’ »

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’ »

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.

Find the right window

/// <summary>
/// SubClassing: Install the wndproc hook
/// </summary>
/// <returns></returns>
private bool hookWindow()
{
    //find taskbar
    IntPtr hWndTaskbar = FindWindow("HHTaskbar", IntPtr.Zero);
    if (hWndTaskbar == IntPtr.Zero)
        return false;
    //enable the taskbar, not realy necessary
    EnableWindow(hWndTaskbar, true);
    //already installed?
    if (oldWndProc == IntPtr.Zero)
    {
        //find the menu_worker window
        IntPtr hwndMenu_Worker = FindWindow("menu_worker", IntPtr.Zero);
        if (hwndMenu_Worker != IntPtr.Zero)
        {
            //get the child window which has the buttons on it
            IntPtr hwndToolbar = GetWindow(hwndMenu_Worker, GetWindow_Cmd.GW_CHILD);
            if (hwndToolbar != IntPtr.Zero)
            {
                _mHwnd = hwndToolbar;       //store to remember
                SubclassHWnd(hwndToolbar);  //subclass the wndproc
            }
        }
    }
    return true;
}

Subclassing

Now, as we have the window handle, the subclassing can be started:
Continue reading ‘Mobile Development: Disable Windows Mobile 6.5 Start and Close Button’ »