how to hide the Clock and Control开发者_如何学Python Panel in Windows-CE 5.0
by C# code or any registry value ?
thank's in advance
I'm guessing that by clock and control panel you mean the task bar?
If so, we use the following helpers to hide/show the whole bar. It is quite a 'hard' method, though, in that it hides it for the system, not just your app, so you need to show it again as your app closes:
private const int SW_HIDE = 0x0000;
private const int SW_SHOW = 0x0005;
[DllImport("coredll.dll", EntryPoint = "FindWindowW", SetLastError = true)]
private static extern IntPtr FindWindowW(string lpClassName, string lpWindowName);
[DllImport("coredll.dll")]
private static extern int ShowWindow(IntPtr hwnd, int nTaskShow);
public static void HideStartBar()
{
IntPtr handle = FindWindowW("HHTaskBar", string.Empty);
if (handle != IntPtr.Zero)
ShowWindow(handle, SW_HIDE);
}
public static void ShowStartBar()
{
IntPtr handle = FindWindowW("HHTaskBar", string.Empty);
if (handle != IntPtr.Zero)
ShowWindow(handle, SW_SHOW);
}
精彩评论