MDI Child Form

J

Jason

I have one MDI Child form for a MDI Parent form. I want
the MDI Child form to not have a control box for
minimizing and and closing the form. I set the control
box property of the child to false. When I run the form,
the minimize and and restore buttons are enabled, but the
close button is disabled. Why is that? How can I just
show the MDI Child form so that the minimize, restore and
close buttons do not show?

Thanks
 
E

Eric

The ControlBox property is the drop down menu in the
upper left corner. You also need to set MaximizeBox and
MinimizeBox to False. Take a look at FormBorderStyle
too, that might give you more of the look you're wanting.

Eric
 
A

Armin Zingler

Jason said:
I have one MDI Child form for a MDI Parent form. I want
the MDI Child form to not have a control box for
minimizing and and closing the form. I set the control
box property of the child to false. When I run the form,
the minimize and and restore buttons are enabled, but the
close button is disabled. Why is that? How can I just
show the MDI Child form so that the minimize, restore and
close buttons do not show?

Then it is not an MDI child. All children are equal. :)
 
J

Jason

Yes, I did those things and I getting the same result. I
set the minimize and maximize buttons to false and I set
the formBorderStyle to none. In the designer, it looks
good, but I run is when it doesn't look correct.
 
T

T Perkins

if you have to control box set to false on the child form then i believe as
long as the child form is not maximized the control box will not show.
you will just have to then set the size of the child window manually to be
the size it would be if maximized.
i believe its technically the parent window dispalying the contol box not
the child, which is why it will only show up when maximized.

i could be wrong but that appears to be what happens
 
A

Armin Zingler

I think you have already done this. If you wanna do the things you are
trying to do, you should not use an MDI application because, IMHO, each MDI
child should always have a min/max/restore button.
 
T

Tian Min Huang

Hi Jason,

Thanks for your post. Please refer to MSDN documentation on Form.IsMdiChild
Property
<http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html
/frlrfsystemwindowsformsformclassismdichildtopic.asp> which says:

"Note All MDI child forms have sizable borders, a control-menu box, and
minimize and maximize buttons, regardless of the settings of the
FormBorderStyle, ControlBox, MinimizeBox, and MaximizeBox properties."

Please feel free to let me know if you have any problems or concerns.

Have a nice day!

Regards,

HuangTM
Microsoft Online Partner Support
MCSE/MCSD

Get Secure! -- www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
 
J

Jason Carter

Then why does it work that way in VB 6.0, but not in .NET. It is very
frustrating.

Jason Carter
 
T

Tian Min Huang

Dear Jason,

Thanks a lot for your feedback. VB6 uses a different forms package than
VS.Net. Since the VS.Net forms package was designed to meet the needs of
several languages, it is to be expected that some things will work
differently from VB6. The differences in the way MDI child forms work is by
design. If you need them to behave differently, you are going to need to
perform what could be some fairly extensive customizing.

One way to fake the effect would be to remove the title bar completely and
create one of your own that behaves the way you want it to.

Please feel free to let me know if you have any problems or concerns.

Have a nice day!

Regards,

HuangTM
Microsoft Online Partner Support
MCSE/MCSD

Get Secure! -- www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top