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

如何在Windows CE 5.0中隐藏时钟和控制面板(按C#或任何注册表值),c#,registry,windows-ce,C#,Registry,Windows Ce,如何在Windows CE 5.0中隐藏时钟和控制面板 通过C代码或任何注册表值 提前感谢我猜时钟和控制面板指的是任务栏 如果是这样,我们将使用以下帮助程序隐藏/显示整个栏。不过,这是一个相当“硬”的方法,因为它会为系统而隐藏它,而不仅仅是为你的应用程序,所以你需要在应用程序关闭时再次显示它: private const int SW_HIDE = 0x0000; private const int SW_SHOW = 0x0005; [DllImport("cored

如何在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);
    } 

我猜时钟和控制面板是指任务栏

如果是这样,我们将使用以下帮助程序隐藏/显示整个栏。不过,这是一个相当“硬”的方法,因为它会为系统而隐藏它,而不仅仅是为你的应用程序,所以你需要在应用程序关闭时再次显示它:

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