Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17


How to open form designer in VB6 project?

Posted on 2013-11-25
Medium Priority
Last Modified: 2013-12-04
I am trying to work on a VB project folder. It has a .vbp file and a couple of .frm and respective .frx files.
I opened the .vbp file using Microsoft Visual Basic 6.0 (SP6).
It opens the code windows for all the forms present in this application. I now want to look at the form design. When I go to the folder and double-click the .frm file and it says "Error during load.."
When I check the corresponding .log file I find a bunch of errors like attached.

What am I missing? Please advise.
Question by:Angel02
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
  • 2
  • +2
LVL 13

Expert Comment

ID: 39676038
is it on a 64 bit computer? seems like those controls are not registered on the machine.
LVL 15

Assisted Solution

ChloesDad earned 400 total points
ID: 39676041
It means that the controls that are required by the form have not been loaded in the project. This could be due to then not being available on the PC or being in a different location.

This is quite normal if you are loading a project on a new PC and can be easily fixed by adding the appropriate controls to the project.

Do not save the frm files as this will cause them to be saved without the controls that caused errors during load
LVL 16

Accepted Solution

HooKooDooKu earned 1200 total points
ID: 39676235
As the others have stated, the controls referenced by the project/form files are either not installed on your machine, or the ones installed are not the correct versions.

Because all of the controls look like controls that come with VB6 (at least the "professional" version, can't speak for "educational" or "free" versions of VB6), it is my guess that you have not installed the same service pack that was installed on the machine that created the VB project/form files.

My advice would be to start by making sure you have the latest VB service pack (SP6) installed on the machine.  If the project/forms still will not properly load, try the following steps.

1. Create a blank project and right click on the "Toolbox" window to display the "Component..." window.  Make sure the following Microsoft components are selected:
Microsoft Common Dialog Control 6.0 (SP6)
Microsoft FlexGrid Control 6.0 (SP6)
Microsoft Hierarchial FlexGrid Control 6.0 (SP4)
Microsoft Windows Common Controls 5.0 (SP2)
Microsoft Windows Common Controls-2 6.0 (SP6)

You might not need the Microsoft FlexGrid Control 6.0 (SP6) and the exact service pack numbers might be different on your copy.

2.  The Toolbox should now have some additional controls.  Drag and Drop at least one instance of the following controls onto the Form of your blank project (hover over the controls in the Toolbox to get their names to display):

3. Save the project.

4. Open the newly saved VBP and FRM files in NotePad to see how these components are referenced in your new files.

5. Open the old VBP and FRM files that are currently failing in NotePad to see how the old project references these components.  Then use NotePad to copy the references as they appear in the new project/form to the old project/form.

6. Save the modified VBP/FRM files and attempt to reopen the failing project in VB.
Tutorials alone can't teach real engineering

So we built better training tools.

-Hands-on Labs
-Instructor Mentoring
-Scenario-Based Tests
-Dedicated Cloud Servers

All at your fingertips. What are you waiting for?

LVL 49

Assisted Solution

by:Martin Liss
Martin Liss earned 400 total points
ID: 39676313
Here's another approach. After you open the project you'll most likely find that several of your controls have been change to image controls, or is it picture boxes - I forget. In any case delete one of them and replace the control from the toolbox or Project}Components giving the new control the name of the one it's replacing. When you have replaced all the problem controls, save the project (to be careful under a new name).
LVL 49

Expert Comment

by:Martin Liss
ID: 39688442
Did any of the above help you?

Author Comment

ID: 39693996
Thank you for the replies.
I think I am missing something here.

I first went ahead and ran VB6 SP6 to make sure I had the right version. FYI, it is a 64 bit machine. The about section on VB6 looks something like attached.
I then tried what  HooKooDooKu suggested. In the component window I don't find any components that HooKooDooKu  mentioned. Is it the version?

Then I tried what  MartinLiss mentioned.
@ MartinLiss: which controls are your asking me to delete? I am not able to open the form at all in the designer. All I see if the code. How do I open the form?
LVL 49

Expert Comment

by:Martin Liss
ID: 39694103
Can you attach your project in a zip file please?

Author Comment

ID: 39695700
OK this is what I did to make it to work. Opened .vbp file of my project in VB6. That opened all the code windows of all the forms in the project. Then selecting one code window I went to View -> Object.
This opened the form window of the selected code window. This is what I wanted to get to know which button on the form goes to which method in the code.

Does this look right? Please advise is anything.
LVL 16

Expert Comment

ID: 39695855
Your 'About' window seems to indicate you've got the right version of VB6.  My 'About' window is just about identical.  The only difference (other than the licensed info) is that I have "Forms3: 12.0.6604.100".

While the Forms3 isn't a perfect match, I don't think that is really going to be your problem.  Your problem is GOING to be these missing components.  Without them, you will never get the project to successfully load and compile.  Think of it this way - your VBP references a set of 3rd-Party ActiveX controls (it's just that Microsoft is the creator of these controls).  If you don't have these 3rd-Party controls properly installed on your computer, then there is no way the project file will successfully open.

If you can't find these components in the "Components" window (on the "Controls" tab)...
  Microsoft Common Dialog Control 6.0 (SP6)
  Microsoft FlexGrid Control 6.0 (SP6)
  Microsoft Hierarchial FlexGrid Control 6.0 (SP4)  
  Microsoft Windows Common Controls 5.0 (SP2)
  Microsoft Windows Common Controls-2 6.0 (SP6)

...then try clicking the "Browse..." button ("Controls" tab of "Components" window) and search for the following files (perhaps in different folders):

What might be your problem (in addition to the missing controls) is the fact you are trying to run this on a 64-bit machine.  From what I understand, Microsoft "officially" says that VB6 will not work with say Windows 7.  But I've also found places like this:
that says it is possible.

At a minimum, you need to see if you can find the above listed OCXs on your machine.  You might have to eventually jump through more hoops to get VB6 running on a Windows 7 machine.

I can tell you that my personal solution when we moved to Windows 7 (where I would have modern versions of Visual Studio installed) was to run VB6 in a "Windows XP Mode" virtual machine within Windows 7.  But you had to have something like "Enterprise" version of windows to be able to do the Virtual Machine.

Author Comment

ID: 39695911
It seems to be working now. I am not sure what went wrong with the previous project version. I made a new copy of the project and it has all the components you mentioned. It also opens the form in designer.
For now I am using Windows XP 32-bit. However we will need to go to Windows 7 soon. Hopefully it works as mentioned in the link your provided.

Thanks all!

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
Microsoft Visual FoxPro (short VFP) is a programming language with it’s own IDE and database, ranking somewhat between Access and VB.NET + SQL Server (Express). Product Description: (http://msd…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
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…
Suggested Courses

704 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