public static bool ForwardWindow(IntPtr hwnd) { if (hwnd != IntPtr.Zero) { DLLInclude.ShowWindow(hwnd, 1); DLLInclude.SetWindowPos(hwnd, -1, 0, 0, 0, 0, 1 | 2); DLLInclude.RECT rectHwnd; DLLInclude.GetWindowRect(hwnd, out rectHwnd); DLLInclude.MoveWindow(hwnd, 0, 0, rectHwnd.Right - rectHwnd.Left, rectHwnd.Bottom - rectHwnd.Top, true); } return(true); }
public static bool OutScreen(IntPtr hwnd) { Rectangle rect = System.Windows.Forms.SystemInformation.VirtualScreen; if (hwnd != IntPtr.Zero) { if (DLLInclude.MoveWindow(hwnd, rect.Width, rect.Height, 1032, 815, true)) { return(true); } } return(false); }