Here is how it can be done. This takes into account all docked controls (including menus) in the mdi parent form.
[C#]
private void FillActiveChildFormToClient()
{
Rectangle mdiClientArea = Rectangle.Empty;
foreach ( Control c in Controls )
if (c is MdiClient ) mdiClientArea = c.ClientRectangle;
ActiveMdiChild.Bounds = mdiClientArea;
}
[Visual Basic]
Private Sub FillActiveChildFormToClient()
Dim mdiClientArea As Rectangle = Rectangle.Empty
Dim c As Control
For Each c In Controls
If TypeOf c Is MdiClient Then
mdiClientArea = c.ClientRectangle
End If
Next
ActiveMdiChild.Bounds = mdiClientArea
End Sub
Contributed from George Shepherd's Windows Forms FAQ