Full Screen

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I'm working with Pocket PC 2003 machines and Windows CE4.2 Machines. I'm
developing with C#.
My aplication must run in both types of Machine.

When I try the code in Windows CE 4.2 the aplication don't looks in full
screen. Are there any standar code in MCF to run aplications in full screen
un both types of operating system?.

Thanks.
 
I try this code form Windows CE 4.2 but don't work.


[DllImport("coredll.dll")]
internal static extern IntPtr FindWindow(String lpClassName, String
lpWindowName);

[DllImport ("coredll.dll")]
internal static extern int SetForegroundWindow(IntPtr hWnd);

[DllImport("coredll.dll")]
internal static extern IntPtr GetFocus();

[DllImport("aygshell.dll")]

internal static extern bool SHFullScreen(IntPtr hWnd, uint dwState);

const uint SHFS_SHOWTASKBAR = 0x1;
const uint SHFS_HIDETASKBAR = 0x2;
const uint SHFS_SHOWSIPBUTTON = 0x4;
const uint SHFS_HIDESIPBUTTON = 0x8;
const uint SHFS_SHOWSTARTICON = 0x10;
const uint SHFS_HIDESTARTICON = 0x20;
const int HWND_TOPMOST = -1;
const int HWND_NOTOPMOST = -2;

const uint SWP_SHOWWINDOW = 0x40;
const uint SM_CXSCREEN = 0x0;
const uint SM_CYSCREEN = 0x1;
const int HHTASKBARHEIGHT = 26;



public bool FullScreen
{
set
{
if (value)
{
this.MaximizeBox = false;
this.MinimizeBox = false;
this.Focus ();
SetForegroundWindow(GetFocus());
bool result = SHFullScreen(GetFocus(), SHFS_HIDESTARTICON |
SHFS_HIDETASKBAR |SHFS_HIDESIPBUTTON); // 0x0020);

}
else
{
this.MaximizeBox = true;
this.MinimizeBox = true;
this.Refresh ();
}
}
}
 
SHFullScreen is a PPC call. You'll have to hide the task bar for CE
devices. Search the archives (adding "HHTaskBar" to the search string will
help)

--
Chris Tacke
Co-founder
OpenNETCF.org
Has OpenNETCF helped you? Consider donating to support us!
http://www.opennetcf.org/donate
 
I find this code (see later) but I need more than hide task bar.

I put the formborderstyle to NONE in order to don't show title, taskbar, ...

This code hide taskbar, but my form are not Maximiced to all the screen.

There are a lot os examples about full screen in google, but most of then
don't works on Windows CE 4.2.

I need a realy full screen (no title, no taslbar, form maximiced).

Thanks

Jorge


private void hideTaskBar ()
{
int h = FindWindow ("HHTaskBar", "");
ShowWindow (h, SW_HIDE);
}

static public void showTaskBar ()
{
int h = FindWindow ("HHTaskBar", "");
ShowWindow (h, SW_SHOW);
}

[DllImport("coredll.dll")]
public static extern int FindWindow (string lpClassName, string
lpWindowName);
private const int SW_HIDE = 0x0000;
private const int SW_SHOW = 0x0001;

[DllImport("coredll.dll")]
public static extern int ShowWindow (int hwnd, int nTaskShow);

[DllImport("coredll.dll")]
public static extern int MoveWindow (IntPtr hwnd, int X, int Y, int
nWidth, int nHeight, bool bRepaint);
}
 
Back
Top