I recently had to install the Microsoft Common Controls on an XP machine that had never had this stuff installed before… Probably these files were missing because this machine had never had Microsoft Office, or VB, or Visual Studio, or whatever suite installs these items.
I needed these files to run a FoxPro app that I had written which used the TreeView control from the VB6/MSCOMCTL.OCX library.
Here is what I learned and how I got it working:
Note: There are TWO Common Control libraries out there. You must figure out which one you need.
1. The older VB 5 Common Controls (COMTL32.OCX)
2. The newer VB6 Common Controls (MSCOMCTL.OCX):
Regarding the older COMCTL32.OCX (VB5 era) versus the newer MSCOMCTL.OCX from VB6 era, one user on StackOverflow had this to say:
“The earlier Common Controls 5.0 (comctl32.ocx) has better compatibility with XP/Vista than the Common Controls 6.0 (mscomctl.ocx). I suggest using it instead” – rpetrich Aug 13 ’09 at 0:44
Step 0: Before installing either of the Microsoft Common Controls you must have the following versions of the Automation system files on your system:
OLEAUT32.DLL 2.20.4054 or greater
COMCAT.DLL 4.71 or greater
OLEPRO32.DLL 5.00.4055 or greater
ASYCFILT.DLL 2.20.4056 or greater
STDOLE2.TLB 2.20.4054 or greater
You may or may not have these files on your system already. I really don’t know how these files generally get installed on a new system; if they are part of the main OS install, or if they get installed with other common Microsoft suites. My guess is that if you have Office 97, Visual Basic 5.0, Visual Studio, Internet Explorer, or Visual C++, etc, you should already have these Automation system files.
Either way, if you do not have these files on your system, you must first download and install them as documented in the following Microsoft Knowledge Base article:
Download here: http://support.microsoft.com/kb/180071/EN-US
(Default download filename will be named Msvbvm50.exe)
1. For the older VB 5 Common Controls (COMTL32.OCX):
Follow Step 0 above.
Once you are sure you have the correct Automation system files on your computer, you can install COMCTL32.OCX by executing COMCTL32.EXE. This will install the following files:
COMCTL32.OCX 5.00.3828 Updated ActiveX control
COMCTL32.DEP 5.00.3828 Dependency info for Visual Basic 5.0 Setup Wizard
MSSTKPRP.DL 5.00.3714 Design-Time Stock Property Pages
The setup program does not install a *license* to use COMCTL32.OCX for development. You must already have a license installed on your system by one of the products listed in the applies to section above in order to COMCTL32.OCX for development.
Download the COMCTL32 install package here:
The default download filename will be comctlzp.exe.
Note: You must then unzip this exe to get the actual installable exe file.
2. For the newer VB6 Common Controls (MSCOMCTL.OCX):
Follow Step 0 above.
As far I could determine, there is no official download link from Microsoft for MSCOMCTL.OCX. You can find tons of free download links all over the internet, but those sites always scare me as they might contain viruses or malware.
I learned a lot about the issues around getting the files downloaded and installed here:
So, based on the info on the above post, here is what I did:
- Locate this file (MSCOMCTL.OCX) on some other XP machine that already has the file. Path is C:\Windows\System 32.
- Copy this file to the same path C:\WINDOWS\SYSTEM32 on the new machine.
- Register the file by running ‘regsvr32 C:\WINDOWS\SYSTEM32\MSCOMCTL.OCX’ at the command window. (Admin right are probably required.)