Esempio n. 1
0
        public static void HideBorder(IntPtr handle)
        {
            uint lStyle = User32Interop.GetWindowLong(handle, User32_WS.GWL_STYLE);

            lStyle &= ~(User32_WS.WS_CAPTION | User32_WS.WS_BORDER | User32_WS.WS_DLGFRAME | User32_WS.WS_SIZEBOX | User32_WS.WS_THICKFRAME);
            User32Interop.SetWindowLong(handle, User32_WS.GWL_STYLE, lStyle);
        }
Esempio n. 2
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);
        }
Esempio n. 3
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);
        }
Esempio n. 4
0
        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);
        }