Hi.
I'm using CF 2.0 under Win Mobile 2003.
Could you tell me how I can disable top line (which consist of StartMenu, time, some connection logos, etc...)
I execute some programms from my programm and I don't want users to switch to another ones before they exit executed.
Thank you very much!

Disabling top line in Win Mobile 2003
cmaro84
Rick T
gdumazet
Thank you very much! That's really what I looked for!
Karl S
public class SHAPI
{
public const int SHFS_SHOWTASKBAR = 1;
public const int SHFS_HIDETASKBAR = 2;
public const int SHFS_SHOWSIPBUTTON = 4;
public const int SHFS_HIDESIPBUTTON = 8;
public const int SHFS_SHOWSTARTICON = 16;
public const int SHFS_HIDESTARTICON = 32;
[DllImport("aygshell.dll")]
private extern static bool SHFullScreen(IntPtr hWnd, int dwState);
public static bool FullScreen(IntPtr hWnd)
{
return SHFullScreen(hWnd, SHFS_HIDESTARTICON | SHFS_HIDETASKBAR);
}
[DllImport("coredll.dll")]
internal static extern int SetForegroundWindow(IntPtr hWnd);
}
public class API
{
[DllImport("coredll.dll", EntryPoint = "FindWindow")]
private extern static IntPtr FindWindow(string lpClassName, string
lpWindowName);
public static IntPtr FindWindow(string windowName)
{
return FindWindow(null, windowName);
}
}
//use the code code above like that
private void Form1_Load(object sender, EventArgs e)
{
this.WindowState = FormWindowState.Maximized;
IntPtr hWnd = API.FindWindow(this.Text);
if (hWnd != IntPtr.Zero)
{
this.MaximizeBox = false;
this.MinimizeBox = false;
this.Focus();
SHAPI.SetForegroundWindow(hWnd);
SHAPI.FullScreen(hWnd);
}
}
However you should also disable the hardware keys in order to prevent user from switching to another application. See if the following posts may help:
http://groups.google.com/group/microsoft.public.dotnet.framework.compactframework/search group=microsoft.public.dotnet.framework.compactframework&q=disable+hardware+keys&qt_g=1&searchnow=Search+this+group
kamal101