D
D M
Hello.
I have used following code to get a full screen form in .NET CF.
Unfortunately after installing SP2 this method does not work
anymore.
What I do is:
VLibFullScreenHelper.ShowStartIcon(form,false);
VLibFullScreenHelper.ShowTaskBar(form,false);
VLibFullScreenHelper.MoveWindow(form,0,0,sizex, sizey);
Could anyone give some hint how to obatian full screen windows with
service pack 2 ?
public class VLibFullScreenHelper
{
public static bool ShowStartIcon(Form f, bool bShow)
{
Int32 dwFlag = bShow ? SHFS_SHOWSTARTICON : SHFS_HIDESTARTICON ;
return SHFullScreen(GetWindowHandle(f), dwFlag) != 0;
}
public static bool ShowSIPButton(Form f, bool bShow)
{
Int32 dwFlag = bShow ? SHFS_SHOWSIPBUTTON : SHFS_HIDESIPBUTTON ;
return SHFullScreen(GetWindowHandle(f), dwFlag) != 0;
}
public static bool ShowTaskBar(Form f, bool bShow)
{
Int32 dwFlag = bShow ? SHFS_SHOWTASKBAR : SHFS_HIDETASKBAR;
return SHFullScreen(GetWindowHandle(f), dwFlag) != 0;
}
public static bool MoveWindow(Form f, int x, int y, int width, int
height)
{
return MoveWindow(GetWindowHandle(f), x, y, width, height , 1) != 0;
}
[DllImport("aygshell.dll")]
private static extern Int32 SHFullScreen(IntPtr hWnd, Int32 dwState);
[DllImport("coredll.dll")]
private static extern IntPtr FindWindow(string className, string
windowName);
[DllImport("coredll.dll")]
private static extern Int32 MoveWindow(IntPtr hWnd, int X, int Y, int
nWidth, int nHeight, int bRepaint);
[DllImport("coredll.dll")]
private static extern Int32 GetClassName(IntPtr hWnd, StringBuilder
className, int maxCount);
private static IntPtr GetWindowHandle(Form f)
{
return FindWindow(formWindowClassName, f.Text);
}
private const int SHFS_SHOWTASKBAR = 1;
private const int SHFS_HIDETASKBAR = 2;
private const Int32 SHFS_SHOWSIPBUTTON = 0x0004;
private const Int32 SHFS_HIDESIPBUTTON = 0x0008;
private const Int32 SHFS_SHOWSTARTICON = 0x0010;
private const Int32 SHFS_HIDESTARTICON = 0x0020;
private const string formWindowClassName = "#NETCF_AGL_BASE_";
}
I have used following code to get a full screen form in .NET CF.
Unfortunately after installing SP2 this method does not work
anymore.
What I do is:
VLibFullScreenHelper.ShowStartIcon(form,false);
VLibFullScreenHelper.ShowTaskBar(form,false);
VLibFullScreenHelper.MoveWindow(form,0,0,sizex, sizey);
Could anyone give some hint how to obatian full screen windows with
service pack 2 ?
public class VLibFullScreenHelper
{
public static bool ShowStartIcon(Form f, bool bShow)
{
Int32 dwFlag = bShow ? SHFS_SHOWSTARTICON : SHFS_HIDESTARTICON ;
return SHFullScreen(GetWindowHandle(f), dwFlag) != 0;
}
public static bool ShowSIPButton(Form f, bool bShow)
{
Int32 dwFlag = bShow ? SHFS_SHOWSIPBUTTON : SHFS_HIDESIPBUTTON ;
return SHFullScreen(GetWindowHandle(f), dwFlag) != 0;
}
public static bool ShowTaskBar(Form f, bool bShow)
{
Int32 dwFlag = bShow ? SHFS_SHOWTASKBAR : SHFS_HIDETASKBAR;
return SHFullScreen(GetWindowHandle(f), dwFlag) != 0;
}
public static bool MoveWindow(Form f, int x, int y, int width, int
height)
{
return MoveWindow(GetWindowHandle(f), x, y, width, height , 1) != 0;
}
[DllImport("aygshell.dll")]
private static extern Int32 SHFullScreen(IntPtr hWnd, Int32 dwState);
[DllImport("coredll.dll")]
private static extern IntPtr FindWindow(string className, string
windowName);
[DllImport("coredll.dll")]
private static extern Int32 MoveWindow(IntPtr hWnd, int X, int Y, int
nWidth, int nHeight, int bRepaint);
[DllImport("coredll.dll")]
private static extern Int32 GetClassName(IntPtr hWnd, StringBuilder
className, int maxCount);
private static IntPtr GetWindowHandle(Form f)
{
return FindWindow(formWindowClassName, f.Text);
}
private const int SHFS_SHOWTASKBAR = 1;
private const int SHFS_HIDETASKBAR = 2;
private const Int32 SHFS_SHOWSIPBUTTON = 0x0004;
private const Int32 SHFS_HIDESIPBUTTON = 0x0008;
private const Int32 SHFS_SHOWSTARTICON = 0x0010;
private const Int32 SHFS_HIDESTARTICON = 0x0020;
private const string formWindowClassName = "#NETCF_AGL_BASE_";
}