如何在全屏模式下显示应用程序,覆盖“开始”菜单?

时间:2013-03-25 17:21:10

标签: c# winforms windows-ce smart-device

我正在为霍尼韦尔Dolphin 6100开发一个应用程序,这是一款带有条形码扫描器的移动计算机,它使用Windows CE 5.0,就像操作系统一样。

问题是我无法将应用程序全屏显示(屏幕下方的开始菜单坚持出现),我尝试了很多代码如下,但遗憾的是没有成功:

解决方案1 ​​

int w = Screen.PrimaryScreen.Bounds.Width;
int h = Screen.PrimaryScreen.Bounds.Height;
this.Location = new Point(0, 0);
this.Size = new Size(w, h);

解决方案2

this.TopMost = true;
this.FormBorderStyle = FormBorderStyle.None;
this.WindowState = FormWindowState.Maximized;

有人有解决方案吗?

2 个答案:

答案 0 :(得分:1)

您可以通过Start->Settings->Taskbar and Start Menu...自动隐藏任务栏并取消选择Always on top并选择Auto hide

如果这不是一个选项,则有一种危险方法可以防止在引导过程中加载explorer.exe。为了工作[HKEY_LOCAL_MACHINE\init],不得写保护。要防止加载explorer.exe,请修改以下注册表项

[HKEY_LOCAL_MACHINE\init]
Launch50="explorer.exe"

例如no_explorer.exe50中的Launch50会因设备而异。

如果你搞砸了这里,你需要telnet访问你的设备,这样你就可以手动启动explorer.exe或者恢复出厂设置。在尝试此操作之前,建议您先重新设置设备。请务必注意,您的应用程序必须从OEM启动程序启动,或者将您自己的应用程序添加到设备的启动过程中。有关如何操作的信息,请参阅http://msdn.microsoft.com/en-us/library/ms901773.aspx

编辑:如果您将应用程序添加到启动过程,则需要向系统发出应用程序已启动的信号。您可以在C ++中创建一个简单的引导程序来完成此任务。

#include "stdafx.h"
#include <Windows.h>
#include <iostream>

void StartMyAppFunction();


int WINAPI WinMain(HINSTANCE hInstance,
                   HINSTANCE hPrevInstance,
                   LPTSTR    lpCmdLine,
                   int       nCmdShow)
{
    StartMyAppFunction( );
    // Since this is application is launched 
    // through the registry HKLM\Init we need 
    // to call SignalStarted passing in 
    // the command line parameter
    SignalStarted(_wtol(lpCmdLine));
    return 0;
}

void StartMyAppFunction() ...

答案 1 :(得分:0)

auto-hiding task bar control panel使用某种技术(WinCE的{{1}}中已存在哪个选项。您可以参考该内容。)

任务栏自动隐藏=全屏应用程序.. :))

相关问题