Fizzmaster Posted August 8, 2003 Posted August 8, 2003 I have a application that has a parent form. This parent acts as a container to the mdi children forms. Each of the MDI children forms does not have a controlbox (no: text, min button, max button) on them. I just want them to show up inside the parent form. I have everything looking fine but when I run the project, the child form has a control box that shows the minimize and restore buttons on it. The minimize button does nothing but when I click the restore button the form is suddenly resized to it design size and the controlbox is gone. How do I get this app to simply have the child form loaded without a controlbox? Quote
*Experts* Volte Posted August 8, 2003 *Experts* Posted August 8, 2003 Do you mean that when you start the program, the child is maximized so that the control-box buttons are in the same place as the menu bar (directly underneath the host window's control box), rather than on a blue caption strip? If that is the case, I doubt you can fix it. It's just simply not the way MDI children are meant to be used. If you want it used in the manner you're saying, I suggest looking into something like a tab control when you can have multiple groups of controls, but only one group visible at a time. Quote
Fizzmaster Posted August 8, 2003 Author Posted August 8, 2003 VolteFace I appreciate your resonse. You are exactly correct that the controlbox of the child window shows up directly below the parent windows. While I understand your sugestion to use a tab or other method to accomplish the same look, this would mean a lot of code being placed into one form. I realize I code break some code out into classes but this seems somewhat crazy for this case. Also, because I am using child forms that inherit from a base form, using tabs would defeat a lot of this. I will look at this option more closely however. I am new to VB.NET but I have been programming VB for a long time. This would seem to be a huge oversight by MS if there is no way around this. There are a lot of applications out there that do this same thing as I am trying to do. Quote
*Experts* Volte Posted August 8, 2003 *Experts* Posted August 8, 2003 It's not an oversight -- MDI children are not meant to be used like this at all. The ones that do manage to hack out someway to do it are misusing the concept of MDI. You could either make it so that the MDI children are movable and collapsable (how MDI is supposed to be), or use standard top-level forms. Either way would allow you to use inherited forms. In any case, to do what you want, you should look at the MDI child's Resize event. When it resizes, check its WindowState -- if it's not set to Maximized, set it to Maximized. Quote
Fizzmaster Posted August 22, 2003 Author Posted August 22, 2003 To let everyone know, the MDI's work the same as they did in VB6. Microsoft is aware that many applications use the method that I stated in my original question and they completely support this method. My problem was a simple one, if you set the WindowState to anything other than the default, you will get the TitleBar even though it is set to False. MS recognizes this as a problem and will correct in the future. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.