Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.


Common Controls 6 Error In Loading DLL

Common Controls 6 Error In Loading DLL

I've been having a problem loading my VB6 project lately.  I'm hoping someone recognizes the problem and can help me out.

When I attempt to load one of my projects, I get an error.  It says, "Errors during load.  Refer to 'C:\folder\frmWhatever.log' for details.  When I look at the log file, it says...

Line 35: Class MSComctlLib.StatusBar of control StatusBar1 was not a loaded control class.

I know the status bar control is in Windows Common Controls 6.0, so I create a new VB project and attempt to add that component.  I click Project -> Components, scroll down to Microsoft Windows Common Controls 6.0 (SP6).  I select it, and click Apply.  I then get an error message that say Error in loading DLL.

A search led me to this: thread222-1050587: Revealing whcih module cannot load.  When I run the code posted by HughLerwill, everything in the list returns Loaded ok/ Unloaded ok except GRID32.ocx, VBPrnDlg.dll, and MUST_FAIL.dll.  Of signifigance though... MSCOMCTL.OCX appears to be ok.  I then ran the compiled code from my application, and sure enough, there's the status bar functioning properly.  So, it appears that the problem I am experiencing is with the VB IDE.  So then I tried including other components.  I could successfully use:

Microsoft Comm Control 6.0
Microsoft Common Dialog Control 6.0
Microsoft Rich Text Box Control 6.0
Microsoft Windows Common Controls 5.0
Microsoft Windows Common Controls-3 6.0

I'm stumped.  I really don't know what else to do.

I'm running Visual Basic 6.0 (SP6).  The about screen says version 9782 in the lower left corner of the window.
comcat.dll version 5.0.2600.1
mscomct2.ocx version

I'm running Windows XP service pack 2.

Other things I have tried:

I've run registry cleaners.
I've re-installed Visual Studio 6.0 (enterprise edition).
I've reinstalled Service Pack 6.
I've reinstalled windows common controls 6.0.

I don't know what else to try.


"The great things about standards is that there are so many to choose from." - Fortune Cookie Wisdom

RE: Common Controls 6 Error In Loading DLL

Although I don't think there is a problem with the Ocx if it works in a compiled version:

To start with, close all running programs. Under Start-Run copy these one at a time and execute:

regsvr32 /u MSCOMCTL.OCX

When you start a new project and add the ocx, or open an existing project which uses it, a mscomctl.oca should be created in the system32. Not so when running the compiled version.

In Windows system32 look for the MSCOMCTL.oca Control Typelib cache, see if it is there (I'd delete it and let it be created again when you open the project).

Look in the registry under:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Visual Basic\6.0
for the CLSID for the MSComctl .oca.

Is it there?

Also, for the future, download and install the DependencyWalker to check dependencies and versions:

(Do a right click in explorer on the ocx, dll, exe  and select "View Dependencies". Check versions of dependencies-right click and properties. For Exe's use the profiling)

RE: Common Controls 6 Error In Loading DLL


Thank you.  Your suggestions helped me resolve this problem.  Apparently, there was another version of the ocx in another folder.  I unregistered that version and registered the correct on (in the system32 folder).  It was the tip about the registry that helped me track down the problem.

On a side note...

When I installed the dependency walker and ran it against the ocx, it's reporting a problem.  

dwmapi.dll  Error opening file.  The system cannot find the specified file (2).

There are 2 other dll's shaded in red.  SHLWAPI.DLL and MPR.DLL.  In the bottom window, I see this...

Warning: At least one delay-load dependency module was not found.
Warning: At least one module has an unresolved import due to a missing export function in a delay-load dependent module.

As of now, I can load my projects and get back to work.  I guess I'm wondering if this is something I should worry about. smile

Thanks again for your help.


"The great things about standards is that there are so many to choose from." - Fortune Cookie Wisdom

RE: Common Controls 6 Error In Loading DLL

Great, and also thank you.

After I though about it again, I realized that the .Oca which I mentioned is anyways nothing of value relating to this.

The dwmapi.dll I think is for Vista.

The SHLWAPI.DLL and MPR.DLL are red probably because of a load-delay, probably here meaning the function is used and probably available when first called (dynamically)

Those last two "errors" are then nothing to worry about.

You can see more hwen you open your application exe with Dependency Walker and use F7 to start profiling, and then open up forms and functions which use the ocx/dll you want to inspect.

>I unregistered that version and registered the correct on (in the system32 folder).  

What version was this and in what folder? It probably got installed by some older program.

RE: Common Controls 6 Error In Loading DLL

>> It probably got installed by some older program.

You're right.


"The great things about standards is that there are so many to choose from." - Fortune Cookie Wisdom

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!


Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close