I have been searching the web and everywhere I asked the question, the answer is that it is a Microsoft Bug. Well instead of telling me that it is a bug, how do I fix this
My situation:
I have a parent form (frmMain), a welcome/startup (or background) form (frmWelcome) and other child forms for data capturing. The idea is that when the program runs, the welcome form is displayed and stays displayed as a type of "background page", displaying outstanding jobs and other system info.
All forms, when opened, must be maximized, thus eliminating the need for the minimize box or maximize box but still having the X button to close the form. In theory this task is easy, but sure enough it's not. I have created the same interface in VB6 but C# has problems with it.
When I load a child form, it is maximized but then the minimize and restore bown buttons appear with the close (X) button. When I click the restore down button, all the forms (including be "background form") is reduced in size. How can it be that when I set the property in code and in design time that it still shows it
Refer to this question:
http://www.experts-exchange.com/Programming/Programming_Languages/C_Sharp/Q_20760384.html query=MDI&topics=327
and
http://www.dotnet247.com/247reference/msgs/33/169116.aspx
Any WORKING workaround would be appreciated.

MDI Maximized children forms without controlbox?
dsutherland
Form your post:
"can you post a little more of your code because I am not getting those resualts at all. I do not see the those box's unless the form is set to state of maximize which you will see those box's thus why i gave a work around to make the box the size of the MDI Window."
You mean that we can not hide these boxes and set child to state of maximize at the same time. I want to get these two at the same time. Is it possible or not Any help,
Thanks a lot.
orekin
My apologies! In my haste I forgot to set the WindowState to normal (it was set to maximized). Your solution does work! Thanks!
I hope they will fix this bug in ver. 2 of the FW.
RichV
Make an MDI child window. Tell it to maximize then show() itself. Then, for fun, tell it to show() again and see how it gets all screwed up.
boniroot
Form2 frm = new Form2();
frm.MinimizeBox = false;
frm.MaximizeBox = false;
frm.MdiParent = this;
frm.ControlBox = false;
frm.Dock = DockStyle.Fill;
frm.Show();
Now the one downside to this is that you can still move the form, but if you minimize the main form or whatever it will just go back to being the full size of the MDI parent. as for the Customer windows or whatever same code except you get rid of frm.ControlBox = flase; So now it looks like:
Form2 frm = new Form2();
frm.MinimizeBox = false;
frm.MaximizeBox = false;
frm.MdiParent = this;
frm.Dock = DockStyle.Fill;
frm.Show();
Its dirty but it works for the current time being
e_LA
YasinMo
Thank you for your reply. I found your code very helpful.
I have 2 options: One is to completely take away the ControlBox and make the form border nothing, letting the user navigate using the menus (and a window list menu) in the main/parent page. The down side is that the user will not be able to close the form using the normal X (close) button. My other option is to only display the close (X) button and nothing else, but for some reason the child form menu (containing Restore, Minimize and Maximize...) and the Restore, minimize (disabled) and close buttons (disabled) still appears. When the user clicks the restore down button all the forms reduce in size.
It looks to me that the "this.MaximizeBox = false", "this.MinimizeBox = false" and "this.ControlBox = false" does not work as wanted. Huge bug if you ask me.
Any suggestions on how to override the control box and not to display it at all
Jain Johny
In that case, when you maximize one form and open the other, which is not supposed to maximize, it would still maximize.
Any ideas on this one
--
Nishant
Somoorthi
bkaye
ok im noob at vb.net app develomnt .. i came across the same issue .. tried this
code and it did work ... but i needed a bit more ... this code works fine for me in these ways:
when mdi is in maximised mode at form load ive to minimise the mdi window and restore it
OR
i open the mdi window in normal state and manually maximise the mdi window ..
in mdi maximised mode at form load the initial display of the welcome form is its normal size .. how do i make both mdi & welcome form maximised at load time
this is the code that i used (the same as above) ..
Dim frmMainScreen As New MainScreen
frmMainScreen.MinimizeBox = False
frmMainScreen.MaximizeBox = False
frmMainScreen.MdiParent = Me
frmMainScreen.ControlBox = False
frmMainScreen.Dock = DockStyle.Fill
frmMainScreen.Show()
also is it possible .. say i want the default application to have btn,grids labels
etc in the same way instead of the welcome form place all those in the mdi itself ..
now normally all controls in mdi get on top of all forms called aftrwards .. can
i make the mdi controls to be in the back ..
hzwang
My situation is a little different. I have a series of independent forms (coming from modules/assemblies). I want to run these forms inside of a control application (that has a menu, etc...). So my goal was to write an MDI window where the children would be maximized, thus gaining the ability to have a central program/form control the displaying of all the other children forms.
But, sadly, the same problem. What is even MORE bizarre is:
After you maximize a child window with no min/max/control box, then get the restore box, and restore it ... a greyed out close box appears on the form with no control box!
This has to be a bug. I'm going to report it, with sample code to MS. I encourage other people to as well.
breedlings
Thank you Microsoft!
All I want is that when I have a maximized child MDI it stays maximized. If I hide it and show it, it should STAY MAXIMIZED. And if I tell a controlbox to go away it SHOULD NEVER EVER COME BACK.
This is driving me batty, I don't know about you guys but this bug is causing me massive headaches in my program.
kishan_99
Eyvind.
kush28
NitinDhall
In MDI, if one child is maximized, all children are maximized.