Thread View: comp.lang.basic.visual.3rdparty
2 messages
2 total messages
Started by bracha
Thu, 18 Dec 1997 00:00
MDI menu
Author: bracha
Date: Thu, 18 Dec 1997 00:00
Date: Thu, 18 Dec 1997 00:00
33 lines
1783 bytes
1783 bytes
(sorry for my bad English) In Visual Basic 5 I want make an MDI application with MDIForm and many MDIchild forms. MDIForm has a large menu (6 or 7 menus in top level). Every MDIChild have own little menu (1 in top level). When an MDIchild form is activated, then I want put the little menu to menubar on MDIForm as a submenu under one of top level names. How can I do it? Example: I have MDIForm with this menu: File-Edit-Business-Parameters Submenu File: New-Open-Save-Close-Exit Submenu Edit: empty, here would be a submenu form MDIchild Submenu Business: News-Changes-Sorting... etc. Submenu Parameters: Par1-Par2-... etc. MDIchild1 menu: New-Edit-Delete-Copy-Paste MDIchild2 menu: View-Select-Export-Import When I load a MDIchild1, I wanna see menu Edit in MDIForm menu bar filled by menu from MDIchild1: Submenu Edit: New-Edit-Delete-Copy-Paste Then I load a MDIchild2 and set it active. I wanna see menu Edit in MDIForm menu bar filled by menu from MDIchild2: Submenu Edit: View-Select-Export-Import HOW CAN I DO IT? Thanks for Your help, please, send e-mail to mcizek@merlin.cz
Re: MDI menu
Author: Daniel Read
Date: Fri, 19 Dec 1997 00:00
Date: Fri, 19 Dec 1997 00:00
45 lines
2633 bytes
2633 bytes
>(sorry for my bad English) > >In Visual Basic 5 I want make an MDI application with MDIForm and many >MDIchild forms. >MDIForm has a large menu (6 or 7 menus in top level). Every MDIChild have >own >little menu (1 in top level). When an MDIchild form is activated, then I >want put the little menu >to menubar on MDIForm as a submenu under one of top level names. How can I >do it? > > <snip> > >HOW CAN I DO IT? > The way to do this is a little strange. You have to add menus to BOTH the MDIForm on the MDIChild form. Some of the menus will be the same on both forms, but some menu items will only be on either the MDIForm or the MDIChild. Only put the minimum menus that you need on the MDIForm--these would be menu items that can be executed when no MDIChild forms are open: such as File->Open, File->Exit, Help->About, etc. Then put these same exact menus on the MDIChild form. Then, ONLY on the MDIChild form, put the rest of your menus--these are menus that would only make sense when an MDIChild form is open: like File->Close, Edit-Copy, Edit->Paste, Format-Font, etc. What you have to remember is that when NO MDIChild form is open, the menu click events will occur in the MDIForm. When there is a MDIChild open, the menu click events will occur in the MDIChild form--NOT the MDIForm. So, for the menu items that are on BOTH forms, you have to code the click events twice: the same exactly in both the MDIForm and the MDIChild. The easiest way to do this is to create procedures for File->Open, File->Exit, Help->About, etc. that both forms' click events will call--maybe in a BAS module or global class. This keeps you from having to keep the same code in two places. Finally, for the menu items that are only on the MDIChild, you only have to worry about them in the MDIChild form. HTH, Dan Read
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads