简体   繁体   中英

how to hide Clock and Control Panel in Windows-CE 5.0 (by C# or any registry value)

how to hide the Clock and Control 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);
    } 

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM