Solved

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

Posted on 2007-11-14
3
186 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Since .Net 2.0, Visual Basic has made it easy to create a splash screen and set it via the "Splash Screen" drop down in the Project Properties.  A splash screen set in this manner is automatically created, displayed and closed by the framework itsel…
The ECB site provides FX rates for major currencies since its inception in 1999 in the form of an XML feed. The files have the following format (reducted for brevity) (CODE) There are three files available HERE (http://www.ecb.europa.eu/stats/exch…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

626 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