[StructLayout(LayoutKind.Sequential)]
public 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;
}
}
}
<StructLayout(LayoutKind.Sequential)> _
Public 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
Use with GetWindowPlacement and SetWindowPlacement