MSComctlLib
MSComctlLib
MSComctlLib
MSComctlLib
MSComctlLib
MSComctlLib MSComctlLib MSComctlLib MSComctlLib MSComctlLib MSComctlLib MSComctlLib MSComctlLib
MSComctlLib MSComctlLib
MSComctlLib
Go Back  Xtreme Visual Basic Talk > > > MSComctlLib


Reply
 
Thread Tools Display Modes
  #1  
Old 04-13-2017, 07:19 AM
mms mms is offline
Ultimate Contributor
 
Join Date: Jul 2002
Location: Hamilton, Ontario
Posts: 1,857
Default MSComctlLib


I don't normally use anything but the intrinsic controls that come with VB, but today came upon a need to do so.

I went to set a reference in my project to one of these, but the ones I seem to remember, were not in the list of available references.

I seem to recall things like MSCommControls1, MSCommControls2, etc.

Were these moved or something in newer Windows versions?
Reply With Quote
  #2  
Old 04-13-2017, 12:26 PM
Cerian Knight's Avatar
Cerian KnightMSComctlLib Cerian Knight is offline
Polymath (in disciplina)

Super Moderator
* Expert *
 
Join Date: May 2004
Location: Michigan
Posts: 4,191
Default

If you need a non-intrinsic ActiveX control, go to Project/Components and look for 'Microsoft Windows Common Controls 6.0 SP6', which unlike References, will make them available in your Toolbox.

If you don't find it, get it here:
https://www.microsoft.com/en-us/down....aspx?id=10019

There may be circumstances where certain 5.0 controls are preferred, but many of the 6.0 SP6 controls (or 6.0 SP5 for Controls-3) have desirable bug-fixes applied that are not available in the 5.0 controls.
__________________
I got all the answers wrong on the GLAT, apparently even #9 (where I put a period in the middle of the box and labeled it 'singularity ripe for rapid inflation').
Reply With Quote
  #3  
Old 04-13-2017, 02:21 PM
mms mms is offline
Ultimate Contributor
 
Join Date: Jul 2002
Location: Hamilton, Ontario
Posts: 1,857
Default

Thank you Cerian Knight.

I'm kind of embarrassed... Components NOT References
That's how long it's been since I've used these.

So, new problem.
If I load these controls in a blank project, they appear in my toolbox and I can use them.

A friend e-mailed a VB project, and when I tried to open it, error after error occurred.
I checked the error logs, and every error referenced these non-intrinsic controls.
When I force the project to load, the IDE's toolbox has these controls in it, but when I run the project, it errors at the first line of code that uses one of these controls.

Any idea as to how to remedy this?
Reply With Quote
  #4  
Old 04-13-2017, 03:41 PM
Cerian Knight's Avatar
Cerian KnightMSComctlLib Cerian Knight is offline
Polymath (in disciplina)

Super Moderator
* Expert *
 
Join Date: May 2004
Location: Michigan
Posts: 4,191
Default

I'm guessing that your friends project was using older versions of the controls.

Unless someone knows of documentation to cover resolution of this issue, here is what I have done in the past:

Use a text editor (e.g. Notepad) to look at .vbp, .frm, etc. files to see what 'Object=...' information is present.

Then compare that information to the files from a project you have created and saved using all the (presumably newer) similar libraries.

As long as you have a backup, perhaps just a simple cut from your new project files and paste (over-writing the conflicting line) into his project files will straighten this out.
__________________
I got all the answers wrong on the GLAT, apparently even #9 (where I put a period in the middle of the box and labeled it 'singularity ripe for rapid inflation').
Reply With Quote
  #5  
Old 04-14-2017, 12:43 AM
dilettante's Avatar
dilettanteMSComctlLib dilettante is offline
Underclocked lifestyle

Forum Leader
* Guru *
 
Join Date: Feb 2005
Location: Michigan, USA
Posts: 4,520
Default

Quote:
Originally Posted by Cerian Knight View Post
There may be circumstances where certain 5.0 controls are preferred, but many of the 6.0 SP6 controls (or 6.0 SP5 for Controls-3) have desirable bug-fixes applied that are not available in the 5.0 controls.
Actually the newer "6.0" OCXs were extended re-imaginings of Common Controls. They duplicate the code of Win32 system controls and added a few thing here and there.

Because of this, what was meant to be a strength became a bit of a curse. They do not routinely get updates and fixes because they are considered "stable." But worse than that, they do not get the same treatment as Win32 controls such as updating to match OS-level changes. For example those UxTheme changes in the Common Controls 6.x assembly (a different "6.0" which can be a little confusing: the VB 5.0 OCXs can use CC6.x while the VB 6.0 OCXs cannot).

One thing that can happen are "bug fixes" to these OCXs, targeted at their usage in 64-bit MS Office. One of these notoriously broke binary compatibility. Sadly they did this "right" in Vista but "very wrong" in Windows 7 SP1. In Vista, VB6.EXE can just upgrade an existing VBP from the 2.0 interface version to the "broken" 2.1 version. In Win7 SP1 no such luck.

The good news is this was fixed in Windows 8 and later, but Win7 being a "dying" version and only on extended support... no such fix to the fix is available.

So even if you manually hack an old VB6 Project's VBP file to use 2.1 on Win7 SP1 it will work, but just sort of. A Vista user can open and run or compile it fine, but anyone else will have to undo the manual hack. We are back to "version 2.0" interfaces in the post-Win7 universe. These are typelib version numbers, not file version numbers.

MS Office VBA plinkers run into the same thing of course, with even less of a clue about what to do.

We are in a post-Win7 world even if Win7 hasn't fallen completely off support yet.
Reply With Quote
  #6  
Old 04-18-2017, 04:14 AM
Daigon Ali Daigon Ali is offline
Regular
 
Join Date: Aug 2014
Location: London
Posts: 50
Default

I have had occasions where you get lots of errors if you open a project containing Common controls 6 on a different PC to the one it was initially created on.
I've found that if you click through the errors and continue to open the project, then re-select the controls from the project components, save and re-open, the issues usually resolve.
Reply With Quote
  #7  
Old 04-18-2017, 11:14 AM
mms mms is offline
Ultimate Contributor
 
Join Date: Jul 2002
Location: Hamilton, Ontario
Posts: 1,857
Default

THAT WORKED!! (sort of)

Thank you.

I was unable to remove the library from the project Component List and re-reference it as you suggested (VB wouldn't allow this) .
I would get the warning message "Control in use".

But similarly what I did was (based on your suggestion):
- first delete the problem CONTROL from the form (remembering what it was named),
- then remove the LIBRARY from the Components List,
- add the library back in the Components list
- add the control to the form and name it to what it was before I deleted it.

The project would then run.

Thank you again!!
Reply With Quote
  #8  
Old 04-19-2017, 08:56 AM
Daigon Ali Daigon Ali is offline
Regular
 
Join Date: Aug 2014
Location: London
Posts: 50
Default

Excellent. I'm glad you got it to work.

You might be able to get away with just saving and re-opening.
Deleting the controls could be an issue for things like a toolbars with lots of buttons and links to an image list etc.
Reply With Quote
Reply

Tags
list, recall, references, remember, windows, mscomctllib


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
MSComctlLib
MSComctlLib
MSComctlLib MSComctlLib
MSComctlLib
MSComctlLib
MSComctlLib MSComctlLib MSComctlLib MSComctlLib MSComctlLib MSComctlLib MSComctlLib
MSComctlLib
MSComctlLib
 
MSComctlLib
MSComctlLib
 
-->