Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations GregLocock on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Saving a vb6 program to a new computer

Status
Not open for further replies.

Domt

Mechanical
Dec 10, 2001
5
In saving a program from one computer to another the newly saved program will not load since the project tries to find the loaded forms by referencing the original source.
How do you save a program to avoid this?
Any help would be appreciated.
 
Replies continue below

Recommended for you

The forms are compiled into the EXE. The most likely problem is the supporting DLLs that the program is trying to find, which are either not installed on the second machine, or are not properly registered. If you do not have the SETUP disk for the program you are trying to copy, your next best bet is a dependancy checker, like the one provided by Seagate Software for their Crystal Reports software (one also comes with VB6 Professional and Enterprise editions). Close down all programs running on the machine where the app is functioning, and run the app in question. Then, run the dependancy checker. Follow the chain from the report for the app in question, and it will tell you the DLLs referenced by the program. Make sure the DLLs are installed on the second machine, verify the same or newer versions (preferably the same, but do NOT downgrade DLLs as this may break other programs!), and use the REGSVR32 program to ensure the DLLs are registered (ex: choose Start, then Run, then type - without the quotes - "REGSVR32 somefile.dll"). If you have to update a DLL on the second machine, use this same command with a "/u" at the end to unregister teh DLL, copy the updated DLL to the machine, then register the new DLL using the first syntax.

The SETUP option is best since it will handle all these details for you. Good luck!
 
To HunterGA:
Thanks again for your responce.
I guess I wasn't clear about the problem.
The transfer of the program I meant was of a program still in the development stage, not compiled.
The second machine also has a fully functioning VB6 development environment. I want to continue development on the second machine, but in attempting to load the transferred program, the project can't find the forms.
What's the best way around this?
Domt
 
Easiest thing to do is to use VSS (Source Safe), provided you have a copy of it and the two machines are networked together. If both of these are true, then startup source safe, create a new VSS database on either machine, load the project into the database. Then, go to second machine, start VSS and attach to database created above, then download the project and have VSS recreate all paths needed for the project.

If you do not have a copy of VSS, have you tried recreating the exact path/file structure on the second machine.

If neither above will work for you, copy all the forms and modules/classes to the new machine, create a NEW project and add all the forms, modules/classes, etc. into the new project - don't forget to set the project references (you can use the other machine to locate all the needed references). This is the painful but foolproof way to get it to work - in the process, you may find an outdated or missing DLL/OCX/OLB...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor