Windows Mobile application in full-screen mode

2019-05-08 06:55发布

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).

4条回答
走好不送
2楼-- · 2019-05-08 07:09

Try this on your main form; it might help:

this.WindowState = FormWindowState.Maximized;
查看更多
爱情/是我丢掉的垃圾
3楼-- · 2019-05-08 07:13

I tested on Windows Mobile 6 Professional VGA emulator, it works. The keyboard button is missed too.

this.WindowState = FormWindowState.Maximized;
this.Menu = null;
this.ControlBox = false;
查看更多
我命由我不由天
4楼-- · 2019-05-08 07:14

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.

查看更多
等我变得足够好
5楼-- · 2019-05-08 07:14

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.

查看更多
登录 后发表回答