473,566 Members | 3,342 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

maximize the MDI child

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.

Aug 2 '07 #1
4 13599
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
Aug 2 '07 #2

You could set the WindowState of the MDI child to FormWindowState .Maximized
when the form loads or when the user presses a button for example. Another
thing you could also do is set the Dock property of the MDI child to
DockStyle.Fill, again depending on what you want to do.

Adrian.
--
[Please mark my answer if it was helpful to you]


"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.
Aug 3 '07 #3

docking worked...

thank you very much..
"Adrian Voicu" <Ad*********@di scussions.micro soft.comwrote in message
news:BE******** *************** ***********@mic rosoft.com...
>
You could set the WindowState of the MDI child to
FormWindowState .Maximized
when the form loads or when the user presses a button for example. Another
thing you could also do is set the Dock property of the MDI child to
DockStyle.Fill, again depending on what you want to do.

Adrian.
--
[Please mark my answer if it was helpful to you]


"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.
Aug 3 '07 #4
how can i make sure the MDI child will be docked when the user clicked on
the maximize button without it's being maximized first!! I tried this but
didn't work.

private void TerminalForm_Re sizeBegin(objec t sender, EventArgs e)
{
if (this.WindowSta te == FormWindowState .Maximized)
{
this.Dock = DockStyle.Fill;
}
}

"Adrian Voicu" <Ad*********@di scussions.micro soft.comwrote in message
news:BE******** *************** ***********@mic rosoft.com...
>
You could set the WindowState of the MDI child to
FormWindowState .Maximized
when the form loads or when the user presses a button for example. Another
thing you could also do is set the Dock property of the MDI child to
DockStyle.Fill, again depending on what you want to do.

Adrian.
--
[Please mark my answer if it was helpful to you]


"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.
Aug 4 '07 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
1832
by: w.p. | last post by:
I use code below: 1) frame receive too many maximize events on create and on close child window - why? 2) how to catch key events for wxMDIParentFrame ? 3) childWin.SetSize() in OnMaximize send additional maximize event (?) 4) wxMDIChildFrame is initially visible! 5) sorry for english :) 6) wxPython 2.5.4.1 (Windows) ...
3
8385
by: Paul Welter | last post by:
I'm building a MDI application that has child forms. I'm trying to find a way to hide the inner boarder of the child frame area. Setting the FormBoarderStyle of the child form has no effect. Also, when the parent form's FormBoarderStyle is set to nothing, then the child form is maximized, I get the minimize and maximize buttons at the top...
0
364
by: Andrew Baker | last post by:
I have a MDI parent which is to open a "Control Panel" style child when it starts. In the load event I have: Private Sub frmMain_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Me.Text += Application.ProductVersion
0
486
by: Bill | last post by:
Hi I have a parent child forms. I want the close, maximize, and minimize buttons to be removed. One the child form I have set the maximize and minimize buttons to false. I have the child form mamiximze in the parent form. So then the maximized button is still active. But I want the child form to fill the parent form without the ability...
3
4493
by: guy | last post by:
VB2005 I have an MDI application, which displays modal forms correctly, and starts up with the MDI form maximized however for non modal forms behavious is unusual all forms have MaximizeBox, Minimizebox and ControlBox set to false and WindowState = Maximized when the form displays it displays with the same size as in the Form Designer
1
2334
by: neeraj | last post by:
Hi people's I developed one MDI application with one MDI form and 2 child forms, form. Border style of first child forms set as Fixed3D and Window State set as normal (like dialog Box) and maximize button set false minimize button set false. My first child form name like FrmClient I have one another child form which Form Border Style...
2
6198
by: John | last post by:
I use C# in VS 2005. In my MDI app, if I click on the title bar of a child form, the form will maximize and the title bar will disappear. I want the app to do it automatically, when launching a child form, maximize it. The question is how to do it. Please help and thank you very much.
1
15095
by: Brett Romero | last post by:
I set an MDI child form to Windowstate=maximized at design time. When I new up and show the child form in the MDI parent, the child's title is hidden since it's pushed to far up (below parent tool bar). On the MDI parent, the resize icon is displayed in the top right. That means the child is maximized right? What doesn't it fill the parent...
0
1421
by: phpfreak2007 | last post by:
Hello all,,, I have created one Application. there are one MDI form and One child.. Initially i set the Window state for both of them to Maximized.. but when i display child form. it shows in Normal Size. but shows the maximize state on the top right with the three button Minimize, restore and Close. I try to maximize it aftter...
0
7584
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7893
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8109
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7645
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
6263
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
5213
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3626
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1202
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
926
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.