全屏模式下的Windows Mobile应用程序 [英] Windows Mobile application in full-screen mode

查看:78
本文介绍了全屏模式下的Windows Mobile应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个使用Visual Studio 2008和C#(智能设备项目)开发的Windows Mobile应用程序.当我运行该应用程序时,顶部显示一个开始菜单栏,底部显示一个键盘栏.如何使我的应用程序以全屏模式运行?

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

推荐答案

摆脱底部的键盘/菜单栏很容易:只需从每个表单中删除MainMenu控件即可.

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

摆脱屏幕顶部的开始菜单(又称任务栏)更加困难,并且需要使用Windows API. 此链接显示怎么做.

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.

有一种更简单的方法可以使您的应用程序全屏显示(抱歉,它还很早,我现在不记得了),但是更简单的方法有一个丑陋的副作用,当您切换到该菜单时,任务栏会立即重新出现应用程序中的另一种形式,这种形式可以杀死所需的信息亭效果.使用上述API来隐藏任务栏,可以防止这种情况的发生.

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.

这篇关于全屏模式下的Windows Mobile应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆