Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

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

Posted on 2007-11-14
3
Medium Priority
?
187 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 2000 total points
ID: 20293042
to hide the menu you can simply use Mainmenu1.Visible = false
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

This tutorial demonstrates one way to create an application that runs without any Forms but still has a GUI presence via an Icon in the System Tray. The magic lies in Inheriting from the ApplicationContext Class and passing that to Application.Ru…
I think the Typed DataTable and Typed DataSet are very good options when working with data, but I don't like auto-generated code. First, I create an Abstract Class for my DataTables Common Code.  This class Inherits from DataTable. Also, it can …
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…

688 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