Client area of windows Form
Hello,
I am developing a MDI form application in C#.
I want to create some child window form according to the parent Form size.
To get the height and width of main parent Form i am using "this.ClientSize.Width" & "this.ClientSize.Height", but somehow it is not excluding the size of Toolbar, MenuBar and scrollbar.
Please tell me the way to find the active client area of a MDI form.
thanks.
Gajesh
Re: Client area of windows Form
Just find the the real mdiclient control from the form controls collection and use its clientsize property
PHP Code:
foreach (Control ctl in this.Controls)
{
if (ctl is MdiClient)
{
MdiClient client = ctl as MdiClient;
Debug.WriteLine(ctl.ClientSize);
break;
}
}