Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

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

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

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

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

Microsoft Reports are based on a report definition, which is an XML file that describes data and layout for the report, with a different extension. You can create a client-side report definition language (*.rdlc) file with Visual Studio, and build g…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
This video shows how to quickly and easily deploy an email signature for all users in Office 365 and prevent it from being added to replies and forwards. (the resulting signature is applied on the server level in Exchange Online) The email signat…
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…

972 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