wince 窗体全屏显示问题(C#开发)

zhoupin 2010-11-24 12:03:54
我希望达到的效果是:全屏显示,不要任务栏、命令栏和输入法
下面是我写的代码但是没任何效果,忘高手指点
还有点就是MoveWindow方法里面的参数应该怎么取得?

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Runtime.InteropServices;

namespace SmartDeviceProject1
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}

const uint SHFS_SHOWTASKBAR = 0x0001;

const uint SHFS_HIDETASKBAR = 0x0002;

const uint SHFS_SHOWSIPBUTTON = 0x0004;

const uint SHFS_HIDESIPBUTTON = 0x0008;

const uint SHFS_SHOWSTARTICON = 0x0010;

const uint SHFS_HIDESTARTICON = 0x0020;

const int SW_HIDE = 0x00;

const int SW_SHOW = 0x0001;

[DllImport("aygshell.dll")]

static extern uint SHFullScreen(IntPtr hwndRequester, uint dwState);

[DllImport("coredll.dll")]

public static extern IntPtr GetCapture();

[DllImport("coredll.Dll", EntryPoint = "MoveWindow")]

public static extern int MoveWindow(IntPtr hwnd, int x, int y, int nWidth, int nHeight, bool bRepaint);

[DllImport("coredll.Dll")]
public static extern bool ShowWindow(IntPtr hWnd, int nCmdShow);
private void Form1_Load(object sender, EventArgs e)
{

IntPtr hwnd = GetCapture();
// MoveWindow(hwnd, 50, 0, 0, 50, true);
SHFullScreen(hwnd, SHFS_HIDETASKBAR | SHFS_HIDESIPBUTTON);//隐藏工具条和输入法
ShowWindow(hwnd, SW_HIDE);



}
}
}
...全文
123 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
兔子-顾问 2010-11-24
  • 打赏
  • 举报
回复
上传到csdn下载了。你下载就可以看到效果。
[C#]wince/mobile下的全屏和取消方法
http://download.csdn.net/source/2855505
兔子-顾问 2010-11-24
  • 打赏
  • 举报
回复
你如果还弄不好,留下邮箱发给你好了。。。

110,545

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 C#
社区管理员
  • C#
  • Web++
  • by_封爱
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

让您成为最强悍的C#开发者

试试用AI创作助手写篇文章吧