About   -   Contact   -   Purchase   -   Search   -   What's New

ComCTL32 Load Errors opening Project
This tip was submitted by Xeros Aqua

After reading Amys Article on Com*.dll load errors it clued me in to the solution to my problem. I kept getting errors when opening my project on different computers, saying that VB was unable to load a:\comctl32.ocx, resulting in every control of that ocx turning into a picturebox.

The article clued me to check the version in the frm and vbp headers, and sure enough. what I did was on the computer on which I was having trouble loading that control. I created a dummy project, with the components and references I needed microsoft common dialog controls, microsoft common controls 6.0 microsoft flexgrid control, microsoft internet controls. Then created a dummy form, with flexgrid, cmndlg and a toolbar for comctl32, saved the project, and compared the vbp and frm headers to my headers and found out a HUGE difference, the dummy projects headers read:

Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCTL.OCX"
whereas my headers were reading
Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#1.3#0"; "COMCTL32.OCX"
not only that, but after that was fixed, the ocx's loaded, but i was still getting errors. I tried out the toolbar control on the dummy form, and dblclicked it to see some event code and saw a problem.
Private Sub tlbMain_ButtonClick(ByVal Button As MSComctlLib.Button)
whereas the same event on mine read
Private Sub tlbMain_ButtonClick(ByVal Button As ComctlLib.Button)
not only the version of the ocx was different, but its internal structure was different, I had to manually with notepad go through the file and change every "comctllib" to "mscomctllib". even though in the components, they are the same version, the ocx is not the same on every system. 

If you could post this some how to the public, to save someone else the headache of dealing with this bug, someone out there would be forever grateful, 
Xeros Aqua.


Top of Page

Legal Notice

Ken Howe 2011