wince 全屏问题,菜鸟求
我用vs2008 建了个一个 wince5.0的项目。我部署到 一台 wince系统的pos机上。
我想全屏,把下面的任务栏隐藏 或者 遮挡 掉。
求教 急啊!!!
[解决办法]
int iWidth = GetSystemMetrics(SM_CXSCREEN);int iHeight = GetSystemMetrics(SM_CYSCREEN);::SetWindowPos(this->m_hWnd, HWND_TOPMOST, 0, 0, iFullWidth, iFullHeight, SWP_NOOWNERZORDER | SWP_SHOWWINDOW);
[解决办法]
Public Declare Function ShowWindow Lib "coredll.dll" (ByVal hwnd As IntPtr, ByVal nCmdShow As Integer) As Integer
[解决办法]
隐藏任务栏
using System.Runtime.InteropServices;//Imports Microsoft.VisualBasicclass hideshowtask{ const int SW_HIDE = 0x0; const int SW_SHOW = 0x1; public int Hwnd; [DllImport("Coredll.dll")] private int FindWindow(string lpClassName, string lpWindowName) { } [DllImport("Coredll.dll")] private bool EnableWindow(int hwnd, int fEnable) { } [DllImport("Coredll.dll")] private bool ShowWindow(int hwnd, int nCmdShow) { } void showtaskbar() { // Try Hwnd = FindWindow("HHTaskBar", null); ShowWindow(Hwnd, SW_SHOW); // EnableWindow(Hwnd, True) // Catch 'ex As Exception // End Try } void hidetaskbar() { // Try Hwnd = FindWindow("HHTaskBar", null); ShowWindow(Hwnd, SW_HIDE); // EnableWindow(Hwnd, False) // Catch ' ex As Exception // End Try }}
[解决办法]
两种方法:遮挡的话记得设置你的界面为全屏,而且一定要记得置顶;如果是隐藏的话,就按上面说的,应该比较容易实现的。
[解决办法]