Solved

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

Posted on 2007-11-14
3
181 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
Comment Utility
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
Comment Utility
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
Comment Utility
to hide the menu you can simply use Mainmenu1.Visible = false
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

Article by: jpaulino
XML Literals are a great way to handle XML files and the community doesn’t use it as much as it should.  An XML Literal is like a String (http://msdn.microsoft.com/en-us/library/system.string.aspx) Literal, only instead of starting and ending with w…
Introduction When many people think of the WebBrowser (http://msdn.microsoft.com/en-us/library/2te2y1x6%28v=VS.85%29.aspx) control, they immediately think of a control which allows the viewing and navigation of web pages. While this is true, it's a…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

772 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

14 Experts available now in Live!

Get 1:1 Help Now