c# windows ce 设备无法将窗体大小更改为全屏
c# windows ce device can't change size of form to Full screen
我用函数
隐藏了屏幕底部的任务栏
KioskMode.Execute("HHTaskBar", false);
现在我希望确保表格占据我尝试过的所有屏幕:
public static void InitializeKioskMode(Form p_Form)
{
p_Form.FormBorderStyle = FormBorderStyle.Sizable;
p_Form.FormBorderStyle = FormBorderStyle.None;
p_Form.WindowState = FormWindowState.Maximized;
p_Form.Width = Screen.PrimaryScreen.WorkingArea.Width;
p_Form.Height = Screen.PrimaryScreen.WorkingArea.Height;
}
表格不会全屏显示我总是在屏幕底部有一个空的 space(我隐藏的任务栏的 space)
有人知道我该如何解决这个问题吗?
任何帮助将不胜感激
编辑:
我在这里找到了解决方案:
Fullscreen app in wince 6.0 c#
重要的是
p_Form.WindowState = FormWindowState.Normal;
之后我使用这样的东西:
IntPtr iptrTB = FindWindow("HHTaskBar", null);
MoveWindow(iptrTB, 0, Screen.PrimaryScreen.Bounds.Height,
Screen.PrimaryScreen.Bounds.Width, 26, true);
[DllImport("coredll.dll")]
private static extern bool MoveWindow(IntPtr hWnd, int x, int y, int cx, int cy, bool repaint);
[DllImport("Coredll")]
internal static extern IntPtr FindWindow(String lpClassName, String lpWindowName);
我在这里找到了解决方案:
Fullscreen app in wince 6.0 c#
重要的是
p_Form.WindowState = FormWindowState.Normal;
之后我使用这样的东西:
IntPtr iptrTB = FindWindow("HHTaskBar", null);
MoveWindow(iptrTB, 0, Screen.PrimaryScreen.Bounds.Height,
Screen.PrimaryScreen.Bounds.Width, 26, true);
[DllImport("coredll.dll")]
private static extern bool MoveWindow(IntPtr hWnd, int x, int y, int cx, int cy, bool repaint);
[DllImport("Coredll")]
internal static extern IntPtr FindWindow(String lpClassName, String lpWindowName);
我用函数
隐藏了屏幕底部的任务栏KioskMode.Execute("HHTaskBar", false);
现在我希望确保表格占据我尝试过的所有屏幕:
public static void InitializeKioskMode(Form p_Form)
{
p_Form.FormBorderStyle = FormBorderStyle.Sizable;
p_Form.FormBorderStyle = FormBorderStyle.None;
p_Form.WindowState = FormWindowState.Maximized;
p_Form.Width = Screen.PrimaryScreen.WorkingArea.Width;
p_Form.Height = Screen.PrimaryScreen.WorkingArea.Height;
}
表格不会全屏显示我总是在屏幕底部有一个空的 space(我隐藏的任务栏的 space)
有人知道我该如何解决这个问题吗?
任何帮助将不胜感激
编辑:
我在这里找到了解决方案: Fullscreen app in wince 6.0 c#
重要的是 p_Form.WindowState = FormWindowState.Normal;
之后我使用这样的东西:
IntPtr iptrTB = FindWindow("HHTaskBar", null);
MoveWindow(iptrTB, 0, Screen.PrimaryScreen.Bounds.Height,
Screen.PrimaryScreen.Bounds.Width, 26, true);
[DllImport("coredll.dll")]
private static extern bool MoveWindow(IntPtr hWnd, int x, int y, int cx, int cy, bool repaint);
[DllImport("Coredll")]
internal static extern IntPtr FindWindow(String lpClassName, String lpWindowName);
我在这里找到了解决方案: Fullscreen app in wince 6.0 c#
重要的是 p_Form.WindowState = FormWindowState.Normal;
之后我使用这样的东西:
IntPtr iptrTB = FindWindow("HHTaskBar", null);
MoveWindow(iptrTB, 0, Screen.PrimaryScreen.Bounds.Height,
Screen.PrimaryScreen.Bounds.Width, 26, true);
[DllImport("coredll.dll")]
private static extern bool MoveWindow(IntPtr hWnd, int x, int y, int cx, int cy, bool repaint);
[DllImport("Coredll")]
internal static extern IntPtr FindWindow(String lpClassName, String lpWindowName);