Convert an MDI form to a standard form in VB6

Posted on 2009-04-25
Last Modified: 2013-11-25
I would like to copy an MDI form irom one VB6 program into another VB6 program that already has a MDI form.  I need the first MDI form because of its extensive Menu items.  If I could somehow convert the first MDI to a standard form then the IDE of the second program would let me just add the form, but won't allow 2 MDI forms.  The only solution short of a great deal of Menu code would be to somehow convert the first form to a standard form then the second program would allow it to be added.

Actually, I am needing to include the functionality of the first program (with the MDI form that I would like to convert) into the second program.  The first program has a rather complex menu system, with underlying code that I plan to copy the underlying code plus the other forms and bas modules into the second program.

Any help or suggestions is greatly appreciated.

Question by:morrisbo
    LVL 5

    Accepted Solution

    There are a few tricks you can do in NotePad..
    Suppose your MDI form is called Main66
    First make a backup of Main66.frm somewhere (in case this doesn't work)
    Open  Main66.frm  in NotePad..
    Look for the line..  Begin VB.MDIForm Main66
    Change that line to..  Begin VB.Form Main66
    Save the file and try Adding it to the 2nd project..
    This usually works sufficiently well to allow you to tidy up any other changes needed..
    LVL 11

    Assisted Solution

    Similarly to Brian's solution: open the both of the MDI forms in Notepad and copy across the menu definition code from the original for to the new form. All of the menu definition blocks will be together -- look for blocks starting with "Begin VB.Menu <MenuName>" -- and is usually, in my experience anyway, the last set of definition entries before the form's attributes and the IDE visible code begins. Once you've copied that in, you can then copy across the user defined code for each of the menu items, in the usual way.

    Author Closing Comment

    Thanks guys - I was able to convert the MDI form to a standard form using notepad, and also viewed the code, so that I now know how to quickly copy and paste the Menu system.

    Both solutions were great.

    Thanks again,

    Morris bO

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Why You Should Analyze Threat Actor TTPs

    After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

    If you haven’t already, I encourage you to read the first article ( in my series to gain a basic foundation of R and R Studio.  You will also find the …
    Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
    The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.
    The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.

    779 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

    12 Experts available now in Live!

    Get 1:1 Help Now