Beispiel #1
0
        private void HideOtherWindow(string name_otherWindow)
        {
            IntPtr hWnd = DllManager.FindWindow(null, name_otherWindow);

            if (hWnd != IntPtr.Zero)
            {
                DllManager.ShowWindow(hWnd, 0);
            }
        }
Beispiel #2
0
        private void ShowOtherWindow(string name_otherWindow, int flag_fullScreen = 1)
        {
            IntPtr hWnd = DllManager.FindWindow(null, name_otherWindow);

            if (hWnd != IntPtr.Zero)
            {
                //                 Rectangle rect=new Rectangle();
                //                 GetWindowRect(hWnd, ref rect);
                Rectangle rect = new Rectangle(new Point(0, 0), new Size(0, 0));
                if (flag_fullScreen == 1)
                {
                    rect = System.Windows.Forms.Screen.PrimaryScreen.WorkingArea;
                }
                else
                {
                    DllManager.GetWindowRect(hWnd, ref rect);
                }
                DllManager.SetWindowPos(hWnd, -1, 0, 0, rect.Width, rect.Height, 0x4000 | 0x0040);
                DllManager.ShowWindow(hWnd, 1);
            }
        }