示例#1
0
        public static void ShowTaskBar()
        {
            IntPtr hwnd = User32Interop.FindWindow("Shell_TrayWnd", "");

            User32Interop.ShowWindow(hwnd, WindowShowStyle.Show);

            IntPtr hwndOrb = User32Interop.FindWindowEx(IntPtr.Zero, IntPtr.Zero, (IntPtr)0xC017, null);

            User32Interop.ShowWindow(hwndOrb, WindowShowStyle.Show);
        }
示例#2
0
        public static void HideTaskbar()
        {
            int hwnd = User32Interop.FindWindow("Shell_TrayWnd", "").ToInt32();

            User32Interop.ShowWindow(hwnd, WindowShowStyle.Hide);

            IntPtr hwndOrb = FindWindowEx(IntPtr.Zero, IntPtr.Zero, (IntPtr)0xC017, null);

            ShowWindow(hwndOrb, SW_HIDE);
        }