Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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.

like image 977
Jay Avatar asked Dec 22 '13 08:12

Jay


People also ask

What is VB6 sp6?

Service Pack 6 for Visual Basic 6.0 provides the latest updates to Visual Basic 6.0. It is recommended for all users of Visual Basic 6.0. This version is the first release on CNET Download.com.

Can VB6 run on Windows 7?

VB6 runtime will ship and will be supported in Windows 7 for the lifetime of the OS. Developers can think of the support story for Vista being the same as it is for Windows 7.


3 Answers

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!

like image 187
Jay Avatar answered Oct 22 '22 08:10

Jay


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.

like image 36
Loloy D Avatar answered Oct 22 '22 08:10

Loloy D


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)

like image 3
yingliu Avatar answered Oct 22 '22 07:10

yingliu