WINDOWPLACEMENT (Structures)
Last changed: -202.74.138.1

.
Summary
The WINDOWPLACEMENT structure contains information about the placement of a window on the screen.

C# Definition:

cmdShow values:

private const int SW_RESTORE = 9;

[StructLayout(LayoutKind.Sequential)]
private struct WINDOWPLACEMENT
{
     public int length;
     public int flags;
     public int showCmd;
     public System.Drawing.Point ptMinPosition;
     public System.Drawing.Point ptMaxPosition;
     public System.Drawing.Rectangle rcNormalPosition;

     public static WINDOWPLACEMENT Default
     {
      get
      {
           WINDOWPLACEMENT result = new WINDOWPLACEMENT();
           result.length = Marshal.SizeOf( result );
           return result;
      }
     }    
}

VB Definition:

<StructLayout(LayoutKind.Sequential)> _
Private Structure WINDOWPLACEMENT
     Public length As Integer
     Public flags As Integer
     Public showCmd As Integer
     Public minPosition As System.Drawing.Point
     Public maxPosition As System.Drawing.Point
     Public normalPosition As System.Drawing.Rectangle
End Structure

Notes:

Use with GetWindowPlacement and SetWindowPlacement

Documentation