Windows Mobile application in full-screen mode

12,212

Solution 1

Getting rid of the keyboard/menu bar at the bottom is easy: just remove the MainMenu control from each of your forms.

Getting rid of the start menu (aka task bar) at the top of the screen is more difficult, and requires using the Windows API. This link shows how to do it.

There is a simpler way to make your application full-screen (sorry, it's early and I don't remember it right now), but the simpler method has an ugly side effect where the task bar momentarily reappears when you switch to another form in your application, which kind of kills the desired kiosk effect. Using the API as above to hide the task bar prevents this from happening.

However, there is a danger to this approach: if your application exits or crashes without having un-hidden the task bar, your user will have no way of unhiding it, and it will remain invisible until the device is reset.

Solution 2

Check Microsoft's example.

While example is for Windows Mobile 2003, you can pick syntax of SHFullScreen call from there. Here is already extracted call with example.

Share:
12,212
RaYell
Author by

RaYell

Solutions architect and developer focused on .NET and mobile technologies.

Updated on June 05, 2022

Comments

  • RaYell
    RaYell almost 2 years

    I have a Windows Mobile application developed with Visual Studio 2008 and C# (Smart Device Project). When I run the application there's a start menu bar visible on the top and keyboard bar on the bottom. How can I make my application run in full-screen mode?

    If possible I would like to have a solution that will allow me to turn full-screen mode on and off on runtime (after clicking some form button for example).

  • RaYell
    RaYell over 14 years
    This is the solution for Windows 2003 application which didn't had .NET support. I'm looking for a .NET solution.
  • RaYell
    RaYell over 14 years
    This is exactly what I was looking for. Thanks.
  • Josip Medved
    Josip Medved over 14 years
    @RaYell: This is for Windows Mobile 2003 but it works on later versions (e.g. Windows Mobile 6). It is true that code is unmanaged but only important thing is call to SHFullScreen. That function you call by interop.
  • MusiGenesis
    MusiGenesis over 14 years
    If you're not worried about the task bar reappearing briefly when you switch forms, the simpler way is just to set the WindowState of your form to Maximized.