Hey

First, some background info.

My program consists of several forms, of which the main one now has around 2300 controls used in over 200 frames. There are about 15 main "sections" in the program - each section has its own root frame which contains up to 30 other frames. They work like tabs, but instead of a tab-strip the user navigates via a main menu and via buttons in these frames. The UI part alone of the MainForm.frm file is 2MB in size.

Editing the main form in the VB6 IDE editor used to be fast, but over the years as the program grew is has become slow. Opening the main form in the VB6 IDE editor used to take about 5 seconds when I used Microsoft Windows Common Controls(-2) 6.0. After switching over to VBCCR16 a week ago, it now takes about 22 seconds to show, and about 10 seconds to close the main form in the IDE. Saving also takes a few seconds. It was bad before, and it's worse now.

Apart from the main form, there are several other much smaller forms (in terms of file size and control count), and they open, close and save instantly. Would be nice if the main form was like that.

The main form is designed much like a website - it has a header frame at the top, a menu frame on the left, and the sections open in the large space that's left.

Name:  screenshot_20200120_184350.jpg
Views: 443
Size:  27.5 KB

The "Home View" in this screenshot is one such section. Another example shows the "Finances" section:

Name:  screenshot_20200120_184551.jpg
Views: 425
Size:  33.8 KB

Splitting the main form up into smaller forms (in terms of file size and control count) makes sense not only from for performance reasons, but also from a logical perspective. I have already isolated each section as much as possible - each section's controls are prefixed with that section's abbreviated title, e.g. the finances section uses FinFrame, FinTextBox, FinListView, etc., and each of these is an indexed control, so there could be FinFrame(1) up to FinFrame(25), FinTextBox(300), etc. So there is only one FinTextBox in my whole program, but it's an array with hundreds of indexed whatever-you-call-them - instances? The same for the "Home" section, for the "Pharmacy", etc.

Now on to the questions.

How can I keep the menu and header layout, but have each section as a separate form, without having to re-implement the menu and header in every form? If I make a change in the menu or header, the change should apply to all forms - I don't want to have to edit 15 or more forms every time I make a change in the menu or header.

Is it possible to embed one form within another?

Is there a different solution, to break up the MainForm.frm into multiple smaller forms?