473,396 Members | 1,797 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

How to maximize MDI child?

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
container area?

When I click the resize icon, the child then jumps to the parent center
and the bottom quarter is hidden out of veiw. I can scroll down to see
it. Now I can see the maximize icon on the child. When I click it,
the child finally maximizes in the parent container space.

I have the child's StartPosition=CenterParent. It seems start position
doen't matter much here. I always have to go through the three step
process to get the child maximized.

Any ideas why the child doesn't start maximized?

Thanks,
Brett

Nov 1 '06 #1
1 15071
I've resolved most of the problem here. I now run this set of code
after creating and before showing the child form:

Rectangle mdiClientArea = Rectangle.Empty;
foreach (Control c in this.Controls)
{
if (c is MdiClient)
mdiClientArea = c.ClientRectangle;
}

childForm.Bounds = mdiClientArea;
childForm.MdiParent = this;

This started the first child form (which loads with the load) not fully
maximized. I then did this

this.Size = Program.settings.frmShellSize;

The above code gets values from a config file and sizes the parent.
Putting my mdiClientArea code before the above sizes the child to the
parent's design time size, which wasn't what I wanted.

I still have an issue with the parent displaying a maximize/restore
icon for the child. I've disabled the child's maximize. If any one
clicks the parent's restore for the child, the child turns into a
vertical line about 2 pixels wide. Any idea how I can get the parent
to stop displaying max/restore icon for the child? I want the children
always maximized.

Thanks,
Brett

Nov 1 '06 #2

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

Similar topics

0
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...
3
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. ...
0
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...
0
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...
3
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,...
1
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...
2
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...
4
by: Jassim Rahma | last post by:
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...
0
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....
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
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...
0
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...
0
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,...

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.