Jassim Rahma wrote:
how can I maximize the MDI child in the free MDI parent area not in the
whole window.. I mean in the (whole window area - menubar - tool bar) so
i want the MDi child to show its whole window and caption bar within the
MDI container.
I don't know that you can. The general point of the maximize behavior
for an MDI child is that the caption bar gets merged with the menu of
the parent window.
However, you could simulate the behavior by checking the WindowState in
the OnResize method of your child form, and if it's Maximized, manually
reset the WindowsState to Normal and adjust the window size and position
to fit where you want it.
I played with this a little, and found that by insetting the parent's
ClientRectangle 5 pixels in width and height, that accounted for the
internal frame you get when a form is an MdiContainer. There might be a
direct way to get these metrics, but if there is I don't know.
For that matter, I haven't done any MDI stuff other than to fiddle
around with it, so I suppose there's a better, more-approved way to
avoid the merging behavior. But if there is, I don't see it.
Pete