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); }
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); }
public static void MinimizeEverything() { IntPtr lHwnd = User32Interop.FindWindow("Shell_TrayWnd", null); User32Interop.SendMessage(lHwnd, User32_WS.WM_COMMAND, (IntPtr)User32_WS.MIN_ALL, IntPtr.Zero); }