473,729 Members | 2,344 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to maximize MDI child?

I set an MDI child form to Windowstate=max imized 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=C enterParent. 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 15141
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.ClientRectang le;
}

childForm.Bound s = mdiClientArea;
childForm.MdiPa rent = this;

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

this.Size = Program.setting s.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
1847
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) ################################################################ import wx
3
8392
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 of the parent from even though the boarder style is set to none for both forms. How do I prevent...
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 to close minimize or maximize the form like a default page.
3
4500
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
2342
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 property set as Fixed3D and
2
6204
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.
4
13604
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 caption bar within the MDI container.
0
1430
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 it display, but still it gives same.. can anybody tell me how to solve this??
0
8761
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 synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
9200
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 most users, this new feature is actually very convenient. If you want to control the update process,...
0
9142
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8148
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 launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6722
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6022
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 into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4525
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4795
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
2163
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 effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.