Moving VB6 Project to Different Computer

Posted on 2008-11-13
Last Modified: 2012-05-05
I'm trying to move a VB6 project from old computer to NEW muscle computer... both are XP Pro.  VB6 is installed and runs fine on both...

On OLD computer, I have directory structure like:
Shared Docs
- ProjectSource

where the folder containing user controls is inside the project source folder... I tweaked the names above a bit to be clear...

On new computer I have to put the source under C:\SomeOtherFolder and when I open project it can't find certain user controls even though they are there in same folder as before...

I looked in the .vbp file to see if there was a hard coded path to the controls but did NOT find any... just refernces to the controls via the folder name...

How do I xfer this project to new computer and fix or eliminate these issues????
Question by:torrid333

    Author Comment

    Follow up... it said I was missing TABCTL32.OCX and I noticed it was not in system32 on NEW computer... so I moved it there and successfully REGISTERED it in windows...

    I still get same error when I open the project... it's trying to open the TABCTL32.OCX file from the source code folder... says it can't load it... does not seem to load from Windows area.... very odd but I say NO to continue loading project...

    Any ideas appreciated.
    LVL 8

    Expert Comment

    I think there is a problem in registering the activex TABCTL32.OCX. Also it will be great for troubleshooting if you post the .vbp file.

    Do you use the following command for registering the control:
    regsvr32 yourcontrol.ocx
    LVL 11

    Assisted Solution

    TABCTL32.OCX is the MS Tabbed dialog control which is hideous looking (it's sooo Windows 3.10) I'd consider replacing it anyway. Either with the Tabstrip control--which can be found in the "Microsoft Windows Common Controls 6.0 (SP6)" bundle--or with a decent 3rd party tab control.

    Author Comment

    I don't even think I use that control to be honest.  I switched to a much nicer control awhile back...
    I don't see it in the .VBP file though.

    Maybe I should let the project load anyway even after the error?

    LVL 11

    Assisted Solution

    The reference would appear near the top of the vbp, something like this:

    Object={BDC217C8-ED16-11CD-956C-0000C04E4C0A}#1.1#0; TABCTL32.OCX

    It could also exist in one of the project's forms.
    LVL 16

    Accepted Solution

    The biggest problem moving a VB6 project from one machine to another is all the dependancies.  What can really mess you up is when the dependancies have been updated such that the registry number stored in the VBP on the new machine doesn't match the registry number stored in the VBP from the old machine.

    What I have found necessary at times (especially when the dependencies are VB DLLs that we've created with frequently changing registy values) is to try to start a new project on the new machine and add the dependancies to this new project.  Save the new project.  Then use a text editor to copy-n-paste the signature of the dependancies as recorded in the new file over the matching dependencies in the old file.  Then you should be able to open the old file on the new machine without any errors (assuming you can find all the dependencies).

    Author Comment

    Turns out I was not using the TabControl but there was a reference to it in the project.  I went through the project and examined everything under Components and References and removed anything I did not think I was using.

    I then RECOMPILED.  THis was all done on the OLD computer.  The recompile verified whether I removed anything I should not have.

    I then moved the project folder over to the NEW computer.  Opened it and NO ERRORS.  Because all of the component references were already on the new computer under windows\system32.  

    Thanks for the suggestions. I should have done this a month ago but thought it was going to be a lot more complicated.

    Featured Post

    IT, Stop Being Called Into Every Meeting

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    Join & Write a Comment

    Introduction While answering a recent question ( in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
    This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
    As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
    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…

    734 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

    22 Experts available now in Live!

    Get 1:1 Help Now