繁体   English   中英

如何在Windows-CE 5.0中隐藏“时钟和控制面板”(通过C#或任何注册表值)

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

如何在Windows-CE 5.0中隐藏“时钟和控制面板”

通过C#代码或任何注册表值?

提前致谢

我猜通过时钟和控制面板,您的意思是任务栏?

如果是这样,我们使用以下助手来隐藏/显示整个栏。 但是,这是一个“硬”方法,因为它对系统(而不只是对您的应用程序)隐藏了它,因此您需要在应用程序关闭时再次显示它:

    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);
    } 

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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