/// <summary> /// Set a windows position according to a Rectangle, including possible flags, inserting it after a given window in the Z Order /// </summary> /// <param name="hWnd">The window Handle</param> /// <param name="coord">The new coordinates of the window</param> /// <param name="insertAfter">The Window to insert after; View SetWindowPos API for constants</param> /// <param name="flags">Flags to set the window position with; View SetWindowPos API for constants</param> /// <returns>Whether the call was successful</returns> public static bool SetPosition(IntPtr hWnd, System.Drawing.Rectangle coord, IntPtr insertAfter, SetWindowsPositionFlags flags) { return(NativeMethods.SetWindowPos(hWnd, insertAfter, coord.X, coord.Y, coord.Width, coord.Height, flags)); }
public static extern bool SetWindowPos(IntPtr hWnd, IntPtr hWndInstertAfter, int x, int y, int cx, int cy, SetWindowsPositionFlags flags);