Adding MDI Menu Options at Runtime

Posted on 2005-05-13
Last Modified: 2011-10-03
In my VB 6.0 app I have the forms set up as MDI.  On my MDI parent I have menu options set up.  Examples of the base options are:

File               Edit     etc...
Save             Cut
Save As        Paste

These will appear as a menu bar.

I have many other options that I want to add that will only be used as popup menu's.  I know I can add them to the menu using the menu editor but since this list could be much more dynamic I am looking for a way to do it in code.  The structure of what I would like to add is something like:  (I will use indentation to denote levels)  Initially I would like them all hidden.  I would make them visible and reference them as popups at the appropriate times.

Caption: Description Options  Name: mnuDescirption  highest level
      Caption: Edit this Description       Name:desEdit
      Caption: Copy this Description      Name:desCopy
      Caption: Delete this Description    Name:desDelete

Caption: Evaluation Options  Name: mnuEvaluation  highest level
      Caption: Edit this Evaluation       Name:evalEdit
      Caption: Copy this Evaluation     Name:evalCopy
      Caption: Delete this Evaluation   Name:evalDelete

These items would have to be added to the exsiting menu items.
Question by:mlcktmguy
    1 Comment
    LVL 7

    Accepted Solution


    Featured Post

    Top 6 Sources for Identifying Threat Actor TTPs

    Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

    Join & Write a Comment

    Suggested Solutions

    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…
    You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
    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…
    This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

    729 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

    21 Experts available now in Live!

    Get 1:1 Help Now