Link to home
Start Free TrialLog in
Avatar of clintonJ
clintonJ

asked on

Hide the max, min and close buttons on a MDI Form

I have a VB that has an MDI form.  I simply want to hide the max, min and close buttons
Avatar of mrichardson01
mrichardson01

On the child form, or the parent form?
set ControlBox property to False
If you open your MDI form as Dialog you only have the close button showing. Annyway, to hide those buttons just put this on the Load event:

Me.ControlBox = False

João Pinto
Avatar of clintonJ

ASKER

My MDI form is the parent form, and when I reference "Me", it has no ControlBox property.
But you want to hide the buttons on your parent or child form? No matter what form you want to hide the buttons, in the form that you want to hide them, put on the Load event the Me.ControBox=False. Or you're trying in the child form to hide the buttons on the parent form? That does not make any sense...

João Pinto
Forgive me for being unclear here.  I inheritied this app from someone else, and I'm really a newbie at VB.  

Here's what I've done:

1. I've set the ContorlBox property to false in every form in my app (using the properties window during design time)

2.  I've set the Maximize property to false in every form in my app (using the properties window during design time)

3.  One of my forms is called MDIForm.  This form has no property for ControlBox or Maximize.  And in the MDIForm Load function, I tried typing Me.ControlBox = False, but this generates a syntax error.  The reason is that the MDIForm has no property called "ControlBox".

I must still be missing something here.
This form as no propertie for ControBox or Maximize because is a Dialog form. That's what I told you before: if the form is open as a Dialog Form, there is no Maximize, Minimize button, only close button.

João Pinto
If there's no maximize button, then why do I see one?
Your form as no ControlBox propertie?!? That's strange. Even in design mode you don't have that propertie?

João Pinto
No.  The only forms that have the ControlBox and Maximize properties in design mode are the child forms.  Again, I have set all those to false for every single form in this application.  The MDIForm does NOT have the ControlBox or Maximize properties in design mode.  I'm using good old fashioned VB 6, so maybe that's why.  Perhaps .net or 2005 has those options for MDIForms?
ASKER CERTIFIED SOLUTION
Avatar of rstomar
rstomar

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
rstomar is right. You've posted your question on the .net version. That's why we where "talking" diferent languages!

João Pinto
Thanks a bunch.  Sorry for posting to the .net area.  My mistake.  Had I posted it correctly, it'd been a lot easier on you experts (and me).

Thanks again.