With a compiled exe you should get a fatal dependency error. Since you have a "form.log" file containing the error you mention, I assume that you have VB6 installed on computer #2 and are getting this error when loading or running the project in the IDE.
There may be several reasons for this error...
1. mscomctl.ocx is missing or not correctly registered
2. mscomctl.ocx is not referenced in the project
3. mscomctl.ocx is incorrectly referenced in the project
Firstly, NEVER copy OCX files to the app path and register them there. ALWAYS copy them to the system path.
The simple reason for this is that the registration process is system wide. In other words, no matter where you copy the file to, when you register it, it will overwrite any registration settings for the same file located somewhere else. This will only create problems in the end. Stick to good practice, and place all OCX files in the system path. (eg: C:\WINDOWS\system32)
I suggest that you try this:
BACKUP YOUR ORIGINAL PROJECT IN FULL BEFORE STARTING!
1. unregister and delete the ocx from the local path
2. copy the ocx to the system path and register it
3. delete your project files (*.vbp, *.frm, etc)
4. copy your project again - DO NOT LOAD OR RUN IT IN THE IDE YET
5. if present, delete the "<project name>.vbw" file (this will ensure that no forms open up in the IDE when you first open the project)
Try opening the project in the IDE - DO NOT RUN IT!
Is there any error? If so, then goto Components, and check that "Microsoft Windows Common Controls (SP6)" is referenced (ticked). If not, then re-referencing it may be all that is needed to fix the problem.
If all else fails, or if you have lots of controls that you don't want to delete and re-add to every form, then you can try the following. (I've written this specifically for "mscomctl.ocx", however I've done this many times before when updating controls that are not binary compatable, and it has always worked.)
BACKUP YOUR ORIGINAL PROJECT IN FULL BEFORE STARTING!
1. open the VB6 IDE and create a new exe project
2. add a form if one is not added automatically
3. open Components and add "Microsoft Windows Common Controls (SP6)"
4. add an imagelist, listview or treeview to the form
5. save the project to a temp location using the default filenames, and quit the IDE
6. goto the temp location and open the "Project1.vbp" file in a text editor
7. in the vbp file, find the reference to "mscomctl.ocx" which should look something like the following (it should be somewhere near the top):
Code:
Object={831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.1#0; [b]mscomctl.OCX[/b]
8. open your app's project file in the text editor, and find the reference to "mscomctl.ocx"
9. replace (copy and paste) the reference to "mscomctl.ocx" in the app project file with the one from the temp project file, and save the modified app file
10. open the temp form file (Form1.frm) in the text editor
11. find the reference to "mscomctl.ocx" which should look something like the following (again, it should be somewhere near the top):
Code:
Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.1#0"; [b]"MSCOMCTL.OCX"[/b]
12. copy this line to the clipboard
13. open all the form files (*.frm) from your app in the text editor
14. in each file, locate the reference to "mscomctl.ocx" and replace it with the one you copied from the temp form file
15. save the modified file
16. repeat steps 13 - 15 for User Control files (*.ctl) and Property Page files (*.pag) as necessary.
This should fix all the reference in your app. You should now be able to open your project in the IDE and run it without any error.
Heaven doesn't want me, and Hell's afraid I'll take over!