Ejemplo n.º 1
0
        public static void ShowTaskBar(bool show)
        {
            var cmd = show ? Win32Consts.SW_RESTORE : Win32Consts.SW_HIDE;

            //系统任务栏
            var handle = Win32Funcs.FindWindowWrapper("Shell_TrayWnd", null);

            if (!IntPtr.Zero.Equals(handle))
            {
                Win32Funcs.ShowWindowWrapper(handle, cmd);
            }

            //开始菜单栏按钮
            handle = Win32Funcs.FindWindowWrapper("Button", null);
            if (!IntPtr.Zero.Equals(handle))
            {
                Win32Funcs.ShowWindowWrapper(handle, cmd);
            }
        }