views:

306

answers:

1

Hi All,

im writing a C# program for a Windowsce 5.0 Device (PSION Teklogix Workabout Pro G2).

The taskbar is set to autohide. I can't disable it completely, because the user sometimes needs to access the start menu or may like to manually show or hide the SIP. And it should not be displayed all the time, because i'd like to use as much of the small display as possible.

My problem is: When the taskbar is minimized at the bottom of the screen and a user clicks somewhere on it (not the startmenu button), it will slide in and is shown correctly. But if the user does not activate the startmenu (by clicking on the windows-Logo), the taskbar won't slide out again, unless the startmenu was opened once.

Is there something like an event or so, that i could send to the taskbar, so it hides again, without the user beginning to access the startmenu ?

Thanks,

Robert

A: 

The way I have done this in the past assuming you mean vanilla ce (standard shell) is to grab the handle of HHTaskBar and simply hide it ;)

I also disable the SipWndClass (just in case the keyboard is left open).

Where iEnabled = true (enter fullscreen), or false to show HHTaskBar: -

        HWND hWndToHide = FindWindow(_T("HHTaskBar"), NULL);
        if(hWndToHide) {
            if(iEnabled) {
                    // Disable VanillaCE TaskBar
                if(IsWindowVisible(hWndToHide))
                    ShowWindow(hWndToHide, SW_HIDE);            

                    // Disable SIPWnd (On Screen Keyboard).
                hWndToHide = FindWindow(_T("SipWndClass"), NULL);
                if(hWndToHide && IsWindowVisible(hWndToHide))
                    ShowWindow(hWndToHide, SW_HIDE);            
            }
            else {
                    // Enable VanillaCE TaskBar
                if(!IsWindowVisible(hWndToHide))
                    ShowWindow(hWndToHide, SW_SHOW); 
            }               
        }   

It shouldn't be too hard to translate this to .NET ;)

David Thornley