Solved

How can I display a child window's  menu with main window's together?

Posted on 2001-09-06
8
182 Views
Last Modified: 2012-05-04
Good everyone
     useing vb I can make popup menu and I want to keep
the main window's menu display still, How can I do?
     If I want to combine them show in main menu bar, How
can I do?


thanks
0
Comment
Question by:taa
  • 4
  • 3
8 Comments
 

Expert Comment

by:surki
ID: 6460132
Hi,
Add a MDI form to you project(keep the Main popup menu's in this form). Make the Mdi Child property of all other forms in the project true. Now the all forms will shown under the main menu

cheers
surki
0
 
LVL 1

Expert Comment

by:dekeldate
ID: 6460222
Hi
Just to clarify.
1. Do you want to create pop-up menus as well as regular menu items?
   Basicly you also build the pop-up menu in the menu builder.
   it is very well explaind in this link
http://msdn.microsoft.com/library/en-us/vbcon98/html/vbcondisplayingpopupmenus.asp

2. Do you want to combine the menu items of say form1, form2 and form3 into one general menu with graying for options not selected?
0
 

Author Comment

by:taa
ID: 6460444
To: dekeldate
1, Yes I did pop-up menus. and I read it.
2, My quection is :

For example:
There are two windows, one is the winA that is MDI main window, the other is the winB that is MDI child window.
each form has a menu. as the MSDN wrote, when the winB appeared, its menu would instead of the winA's menu. That is not I want. I hope at this time, both menu could display on main window.
because the menu of winA is member of it, so I can easy write the code and wrap them in one module, that would be better to maintain later.

In my case, the winB's menu is created for pop-up menu, ofcause , I do want to show it in winB and winA either.
and then when I disvisiable it , winA's menu must be disappeared when the winB appeared. and I want not write the code in the winA for winB.

So My queation is:
 How can I display the winB's menu within winA'menu and write code in each module without case the variable scope?

thanks
 

0
 

Author Comment

by:taa
ID: 6460451
So My queation is:
How can I display the winB's menu within winA'menu and write code in each module without care the variable
scope?

Could you give me any advice for this kind of problem?
0
Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

 
LVL 1

Expert Comment

by:dekeldate
ID: 6460523
How about instead of making a seperate menu for winB add if the menu structure to winA.

Then when you do not want to display it(as when winB is not visible) set visible property of the top-node for the winB menu structure to false.
0
 

Author Comment

by:taa
ID: 6460790
That would be ok for merge menu,
but then I will write code in the winA for winB that will
consider the variables scope, is it ?
0
 
LVL 1

Accepted Solution

by:
dekeldate earned 100 total points
ID: 6461050
you could make prperties and functions in winB and call these from winA

example in winA
private sub mnu_ForWinB
  winB.mnuAction
end sub
0
 
LVL 1

Expert Comment

by:dekeldate
ID: 6468202
Thanks :o)
0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

705 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

20 Experts available now in Live!

Get 1:1 Help Now