I was asked to help work on a legacy vb6 application for someone, so I decided to toss Visual Studio 6 on my Windows 7 x64 laptop following this guide.
It installed fine, and from I can see everything is working except for Microsoft Windows Common Controls 6.0 (sp6). Microsoft Windows Common Controls-2 6.0 (sp6), Microsoft Windows Common Controls 5.0 (sp2), etc. all work just fine. However, when I try to add the Microsoft Windows Common Controls 6.0 (sp6) component I get the error:
'' could not be loaded
I could not add an image, so I have uploaded a screen shot to here for anyone wanting to see it exactly:
I have tried registering/un-registering/re-registering MXCOMCTL.OCX, MSCOMCT2.OCX, msdatsrc.tlb all with no success. I have also uninstalled a known security update that may have caused issues with Windows Common Controls. I have removed IE11, even though reports state IE11 will not cause issues with MSCOMCTL.OCX the way IE10 did.
I run VB6.EXE in Windows XP SP3 Compatibility mode. With Disable visual themes, Disable desktop composition, and Disable display scaling on high DPI settings. As well as run it as administrator.
I have also attempted to open a previous project that utilizes this control, and it fails during load with the same "blank" error as in the screen shot with the following in the generated error log:
Line 35: Class MSComctlLib.ListView of control lvData was not a loaded control class. Line 223: Class MSComctlLib.StatusBar of control Stat was not a loaded control class.
So that tells me it isn't a version issue within the .vbp like some suggest (as it happens with new, blank projects as well).
I am at wits end. Apparently people have gotten both VB6 and Windows 7 x64 to work properly (with Windows Common Controls) but NOTHING I have tried alleviates my problem. I am hoping someone here may have run into this, or have some ideas as to what is going on.
Just today I had the (questionable) pleasure to get VB6 code running on Windows / 64 Bit. I did come across this thread, but none of the proposed solutions worked for me. Neither worked adding references using the "Project -> References..." menu.
To get it running, I had to manually modify the VB6 project file (*.vbp). For all the libraries I had load issue with I had to use the following notation to define as reference: Object={Registry Key}#Version#0; LIBRARY.OCX Example: Object={FAEEE763-117E-101B-8933-08002B2F4F5A}#1.1#0; DBLIST32.OCX
I had not to register any of the libraries (using regsvr32), these were all already correctly registered. I guess why my solution works is that if the "object={[...]" notation is used (instead of the "Reference=*\G{[...]" notation) VB Studio is using the Registry Key only and gets rooted to C:\Windows\SysWOW64 while as the other way ends up looking in C:\Windows\System32
By the way, IE11 is installed. Whether or not this matters, only Bill G might know. My guess is that my solution works regardless which IE is installed. You just might have to unregister and register the missing libraries as mentioned in this thread.
Hope that helps anyone who faces similar issues.
SIMPLE SOLUTION
DONE
good luck
=> just what jay said just delete those registry entries which are pointing to other paths other than on c:\windows\system32.Those are the culprits of the error.I got those errors on my vb6 IDE and after deleting those anomalous registry entries the problem was fixed. works like a charm.
I had the problem whereby VB6 IDE would not load the common controls (Sp6)with VB6 install on W7 64bit, specifically comctrl and msmask. I tried all the solutions proposed using regsrv32 (elevated), edited the registry, changing the version number in the vbp etc as proposed by MS and others. All failed. These solutions worked on my other 2 PCS but not this one. Eventually I removed IE11 and all worked properly afterwards. IE10 had never bene installed on thsi PC - we went straight from IE8 to IE11 and have been forced to backtrack to using IE8.
I have to say the simple solution above does not address the problem which is that the VB6 IDE will not load the common controls (using the Components menu selection under Project) - you get an error saying Object not loaded. So this will happen (and I proved this to myself) on any project, new or old that try to use theose common controls that will not load.
So my suggestion to anyone who has this problem is to try the manual register solution using regsrv32 route, then the edit the vbp to change the version, and if these fail uninstall IE11 (and defintely IE10). But this may still not be a 100% solution because if your existing project files ".vbp" contain references to the wrong common controls you need to correct that manually - this is where loading a new project, loading the Components you need inside the IDE, then edit the newly create vbp using notepad and copy the version numbers for the common controls to your existing vbp files.
I was having the same difficulty loading my VB 6 project. Here is a sample error message: "Class MSComctlLib.ProgressBar of control prgExecution was not a loaded control class."
This problem was solved by some Microsoft Magic as follows: I opened the Project Components window in my broken project. I clicked on Browse and found the file MsComctl.ocx. I clicked on OK. VB 6 then got stuck (the application non responsive). After some time, I ended the VB 6 application using the task manager.
Then, magically, when I opened up my VB 6 project to show my programming friend what a POS this project was, all the controls were back, linked as expected. Somehow, something was registered or fixed.
My solution was replacing the MSCOMCTL.OCX on windows 10 box with one from a Windows 7 box that also had MS Access installed. For some reason, there are different MSCOMCTL.OCX 2.0 controls with the same name.
I know this sounds crazy, and might not help anyone else, but we have saved this MSCOMCTL.OCX with a readme file and it has fixed our new install errors every time.
we unregister the current MSCOMCTL.OCX that came with Windows 10 box, delete it, and register the old one we have saved.