Visual Studio 6 Windows Common Controls 6.0 (sp6) Windows 7, 64 bit

121,908

Solution 1

While waiting for a reply for ideas here, I had decided to try something. I ran regedit as administrator, navigated to the HKEY_CLASSES_ROOT\TypeLib Key and then did a search for "MSCOMCTL.OCX"... I deleted EVERY key that referenced this .ocx file.

After searching the entire registry, deleting what I found, I ran command prompt as administrator. I then navigated to C:\Windows\SysWOW64 and typed the following commands:

regsvr32 MSCOMCTL.OCX
regtlib msdatsrc.tlb

Upon registering these two files again, everything is WORKING! I scoured the web for HOURS looking for this solution to no avail. It just so happens I fixed it myself after posting a question here :( Even though Visual Studio 6 is outdated, hopefully this may still help others!

Solution 2

Implementing the two directives already worked for me from within "C:\Windows\SysWOW64"

regsvr32 MSCOMCTL.OCX
regtlib msdatsrc.tlb

It's worth noting that the DOS box should be in Administrator mode. Prior to this, I kept having errors in the vein "Class MSComctlLib.TreeView of control tvTreeView was not a loaded control class" and "Class MSComctlLib.ListView of control lvListView was not a loaded control class".

I am also using Visual Studio 6 on 64 bit Windows 7, with SP6 updates. I was driven here due to the same problem. In my case, I did not need to go through the registry.

Solution 3

I have searched this issue for hours and clicked in hundreds of websites, none of them worked.

My final solution:

  1. run:cmd
  2. cd c:\Windows\SysWOW64(locate to the location)
  3. regsvr32 MSCOMCTL.OCX

this solves the first one. For the second one:

  1. run: cmd
  2. cd c:\Windows\Microsoft.NET\Framework\v4.0.30319
  3. regtlibv12 msdatsrc.tlb

done.

this may not work for everybody (considering the system version reason, etc)

Solution 4

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.

Solution 5

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.

Share:
121,908

Related videos on Youtube

Jay
Author by

Jay

Updated on January 05, 2020

Comments

  • Jay
    Jay over 4 years

    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:

    http://i.imgur.com/7aym4xB.png

    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.

    • SteveChapman
      SteveChapman over 10 years
      one idea - it will probably be quicker and less painful to virtualise windows xp and start again...
    • Jay
      Jay over 10 years
      I figured out the fix for this, I just can't post an answer to my own question for 8 hours because I am on a new account (forgot the login info for my old one). I really didn't want to run xp in a vm just to use 1 application... which is why I spent so much time trying to find a fix for this. Thanks for the suggestion though.
    • E.J. Brennan
      E.J. Brennan over 10 years
      I second the 'run xp in a vm', I can almost guarantee you will be glad you did in the long run.
    • Lynn Crumbling
      Lynn Crumbling over 10 years
      @E.J.Brennan I run vs6 sp6 in Win7 x64.. no problems.... kb 2640696 must be applied to correct the ADO guid issue, though.
    • E.J. Brennan
      E.J. Brennan over 10 years
      Yes, but just because its possible, doesn't mean it's a good idea. What happens when the next thing gets installed/updated and the whole thing breaks again? Still think its a good idea to setup a stable vm if you need to work with a 15 year old developer tool that isn't supported by MS anymore.
  • Jay
    Jay over 10 years
    No problem, glad another person found this useful.
  • Herman
    Herman over 9 years
    Thanks, you have probably saved me a ton of work. Like Loloy D below, I just ran the commands without going through the registry. And instead of regtlib (which was not found on my system) I have used regtlibv12. The later is included in (some) .NET framework versions.
  • sdouble
    sdouble almost 8 years
    Been googling this nonsense for the past hour, ran across this post and solved my problem. I had to remove it from the registry in order for this to work. I was having problems with mscomctl.ocx and comctl32.ocx. unregistering and reregistering didn't help, needed to purge from the registry. Thanks Jay!
  • Daniel Scott
    Daniel Scott over 7 years
    FYI, rather than searching through the registry and removing references to MSCOMCTL.OCX I ran regsvr32 /u mscomctl.ocx before running the two commands in Jay's answer and it worked ok for me. Also, I used regtlibv12 from the .net framework directory ( C:\Windows\Microsoft.NET\Framework\v4.0.30319 ) - so in some cases it seems unregistering works well enough (I'm on Win 7 32 bit however).
  • frumious
    frumious over 7 years
    Ideally the steps to resolve would be in the Answer itself, with a link to the source for backup. Also, this link is to a French language page, is that likely to be the most useful format for the readership of this site?
  • Tom Wilson
    Tom Wilson over 7 years
    Same here. With 2008R2, I just unregistered the ocx, re-registered it, and registered the tlib with regtlibv12 from the Framework directory. All from an elevated command prompt. (Click Start, type "command", then right-click "Command Prompt" from the list and select "Run as administrator")
  • Joe Kdw
    Joe Kdw over 7 years
    I did like you'd done (removed keys related to it) and when I ran the new projects, there are so many ocx got failure, such as, comdlg32.ocx, etc. Well, I almost got frustrated. Then I downloaded file "microsoft windows common controls (SP6) and installed them and everything went great. I downloaded the file here: download.microsoft.com/download/3/a/5/…