Windows Mobile application in full-screen mode

落爺英雄遲暮 提交于 2019-12-05 14:36:42

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.

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.

Try this on your main form; it might help:

this.WindowState = FormWindowState.Maximized;

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;
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!