|
-
June 14th, 2007, 01:41 AM
#1
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
-
June 14th, 2007, 03:55 AM
#2
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;
}
}
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|