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
Visual Basic.NET

Avatar of undefined
Last Comment
clintonJ

8/22/2022 - Mon
mrichardson01

On the child form, or the parent form?
rstomar

set ControlBox property to False
jppinto

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
Experts Exchange is like having an extremely knowledgeable team sitting and waiting for your call. Couldn't do my job half as well as I do without it!
James Murphy
ASKER
clintonJ

My MDI form is the parent form, and when I reference "Me", it has no ControlBox property.
jppinto

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
ASKER
clintonJ

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.
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.
jppinto

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
ASKER
clintonJ

If there's no maximize button, then why do I see one?
jppinto

Your form as no ControlBox propertie?!? That's strange. Even in design mode you don't have that propertie?

João Pinto
Your help has saved me hundreds of hours of internet surfing.
fblack61
ASKER
clintonJ

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
rstomar

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
See how we're fighting big data
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
jppinto

rstomar is right. You've posted your question on the .net version. That's why we where "talking" diferent languages!

João Pinto
ASKER
clintonJ

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.
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.