There is a way to get this information by calling base Win32 methods.
/// <summary>
/// The WINDOWPLACEMENT structure for the Win32 interface.
/// See Microsoft documentation for details.
/// </summary>
private struct Win32WindowPlacement
{
public UInt32 length;
public UInt32 flags;
public UInt32 showCmd;
public Win32Point minPosition;
public Win32Point maxPosition;
public Win32Rect normalPosition;
public Win32WindowPlacement(UInt32 length, UInt32 flags,
UInt32 showCmd, Win32Point minPosition,
Win32Point maxPosition, Win32Rect normalPosition)
{
this.length = length;
this.flags = flags;
this.showCmd = showCmd;
this.minPosition = minPosition;
this.maxPosition = maxPosition;
this.normalPosition = normalPosition;
}
public Size WindowSize
{
get
{
return new Size(this.normalPosition.Width,
this.normalPosition.Height);
}
}
}
/// <summary>
/// The POINT structure for the Win32 interface.
/// See Microsoft documentation for details.
/// </summary>
private struct Win32Point
{
public Int32 x;
public Int32 y;
public Win32Point(Int32 x, Int32 y)
{
this.x = x;
this.y = y;
}
}
/// <summary>
/// The RECT structure for the Win32 interface.
/// See Microsoft documentation for details.
/// </summary>
private struct Win32Rect
{
public Int32 left;
public Int32 top;
public Int32 right;
public Int32 bottom;
public Win32Rect(Int32 top, Int32 left, Int32 bottom, Int32 right)
{
this.top = top;
this.left = left;
this.bottom = bottom;
this.right = right;
}
public Int32 Width
{
get { return this.right - this.left; }
}
public Int32 Height
{
get { return this.bottom - this.top; }
}
}
[DllImport("user32.dll", SetLastError=true)]
static extern bool GetWindowPlacement(IntPtr hDc, out
Win32WindowPlacement placementInfo);
and then...
IntPtr windowHandle = theForm.Handle;
Win32WindowPlacement placement;
if (GetWindowPlacement(windowHandle, out placement))
{
... get form's true size from "placement.WindowSize" ...
}