I'm developing a custom form that provides more options to customize the appearance of the form.I have override the wndproc and calculated the size of the form.While the form's BorderStyle is set to the FormBorderStyle.SizeableToolWindow,the size of the form will decreases.I have no idea about the SizeableToolWindow and i have done some calculation but it fails,Is there any way to fix in the generic way.
if (this.WindowState == FormWindowState.Maximized)
{
///<summary>
/// local variable to store x-coordinate of native rectangle,rc.left is -8 when maximize the parent form and -6 when maximize the child form.
///</summary>
int xcoordinate = IsMdiChild ? -6 : -8 ;
rc.left -= xcoordinate;
rc.right += xcoordinate;
rc.bottom += xcoordinate;
}