How to share a menu bar between two forms?
Hey, everybody.
I'm writing a small software similar to the calculator in Windows, the calculator in Windows has a menu bar; in the menu bar, you can find "scientific" and "standard" mode; once you select different mode, your form will be changed, but the two forms still share the same menu bar.
I want to create the same effect of this:
1. Two forms, only one is visible at any time
2. The menu bar on the top of the two forms should be shared between these forms
I just started learning VB for 2 weeks, I'm not sure my thinking can be achieved by VB, if not, please inform me the right way to do it.
Please give details since I'm just a beginner.
Thank you very much for your time in advance
Re: How to share a menu bar between two forms?
Its not that hard or time consuming to add two different menus to two different forms, unless you have any other specific reason to do the same.
Re: How to share a menu bar between two forms?
Hey, aashish. Thanks for your reply.
Do you mean to have seperate menu for two forms? But there is a connection between them.
If you have a look at the claculator in Windows, it indicates which mode you are using now -> a black dot in front of the current mode, so how can I do this if I implement by using seperated menu?
Thanks in advance
Re: How to share a menu bar between two forms?
don't use more than one form.... have two different views on the same form.
put each view in a panel. Dock both to fill. then on the menu click event, hide one panel and show the other, and resize the form.
-tg
Re: How to share a menu bar between two forms?
Thanks for your reply, you are right, two forms will be a bad way to do it.