Convert an MDI form to a standard form in VB6

Posted on 2009-04-25
Medium Priority
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

Accepted Solution

BrianVSoft earned 1200 total points
ID: 24235211
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

Antagony1960 earned 800 total points
ID: 24235857
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

ID: 31618501
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

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

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.
Article by: evilrix
Looking for a way to avoid searching through large data sets for data that doesn't exist? A Bloom Filter might be what you need. This data structure is a probabilistic filter that allows you to avoid unnecessary searches when you know the data defin…
This video teaches viewers about errors in exception handling.
The viewer will be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.
Suggested Courses

839 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