Link to home
Start Free TrialLog in
Avatar of Angel02
Angel02

asked on

How to open form designer in VB6 project?

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.
EE-Error.txt
Avatar of Surone1
Surone1
Flag of Suriname image

is it on a 64 bit computer? seems like those controls are not registered on the machine.
SOLUTION
Avatar of ChloesDad
ChloesDad
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Avatar of HooKooDooKu
HooKooDooKu

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Did any of the above help you?
Avatar of Angel02
Angel02

ASKER

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?
vb6.png
Can you attach your project in a zip file please?
Avatar of Angel02

ASKER

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.
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):
  C:\WINDOWS\system32\COMDLG32.OCX
  C:\WINDOWS\system32\MSFLXGRD.OCX
  C:\WINDOWS\system32\MSHFLXGD.OCX
  C:\WINDOWS\system32\COMCTL32.OCX
  C:\WINDOWS\system32\MSCOMCT2.OCX

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:
http://stackoverflow.com/questions/2501061/does-the-vb6-ide-run-on-windows-7-64-bit
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.
Avatar of Angel02

ASKER

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!