Solved

How do I hide the menu on the parent form in a MDI program?

Posted on 2007-11-14
3
182 Views
Last Modified: 2010-04-23
I am currently writing an HMI for my company. The program needs to consist of multiple FULL screen forms and a few dialog forms. I want the program to be MDI so that there aren't multiple "Programs" - which are really just forms in my case, displayed on the taskbar. I am having a problem with the Menu showing up on the top of the parent form reguardless of what my settings for that form are (Maximized, No border style ect.). The Menu up there will not serve a purpose and is an eye sore. So with that here are my questions:

1. Is there a way to completely hide this menu that appears when you set a form to "IsMDIContainer"?
2. Would it be better to just set the form setting "Show in Taskbar" to false?
3. If #2 is the way to go, what are the con's to this method?

I appologize for my lack of knowledge in this subject - I am a relatively new coder. Thank in advance for you help!
0
Comment
Question by:Gssc1414
  • 2
3 Comments
 
LVL 15

Expert Comment

by:Solar_Flare
ID: 20285685
1. you could handle the forms OnMDIChildActivate event to set the menu visibility to false, you would also need to find a way to tell when a child form closes at which point you can check if the MDIChildren property has 0 items and set the menu visibility back to true. (this is assuming that you want to have a menu in the mdi parent, but have it hidden while there are children, and then visible again when all children are closed)

2. that is probably an easier way to do it if you are not going to have large numbers of forms open at one.

3. with this method there is no way to select a form that you want when it is not currently visible. you have to minimize/close/move the other forms to get to the one you want. definitely bad when you have lots of forms.
0
 
LVL 3

Author Comment

by:Gssc1414
ID: 20285757
Solar_Flare,

Thanks for the fast response!

I am going to have roughly 8-10 forms max, so im thinking im going to go with the easier method right now. Although, I would like to know how to actually code this. Im wondering what is the actual syntax to hide the menu? I have searched but can't seem to find a solution that works....

Thanks!!
0
 
LVL 15

Accepted Solution

by:
Solar_Flare earned 500 total points
ID: 20293042
to hide the menu you can simply use Mainmenu1.Visible = false
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you're writing a .NET application to connect to an Access .mdb database and use pre-existing queries that require parameters, you've come to the right place! Let's say the pre-existing query(qryCust) in Access takes a Date as a parameter and l…
Creating an analog clock UserControl seems fairly straight forward.  It is, after all, essentially just a circle with several lines in it!  Two common approaches for rendering an analog clock typically involve either manually calculating points with…
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…
Internet Business Fax to Email Made Easy - With  eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, f…

911 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now