VB6 Common Controls 5.0 / 6.0 differences?

Posted on 2004-11-17
Last Modified: 2013-12-25
I've been testing the listview control from Microsoft Windows Common Controls 5.0 (SP2) and Microsoft Windows Common Controls 6.0 (SP6).

I realized that the listview control in SP6 doesn't act normally as normal Explorer listview control does.
This was the test that I've been doing:
* Place 2 listview controls from different versions on a form and set both view to lvwReport and MultiSelect property to True.
* Initialize ColumnHeaders and populate the listview items (3+) in Form_Load event.
* Run the application, select first record of each. (If it's not yet been selected)
* Drag and select the last item in the list.

The result I see is when selecting the SP2 listview items it reacts like Explorer does - selected items will be updated to most recent selections and first item de-selected.
With SP6 listview control, I get last item been selected (this is correct), and the first item remain selected, end up the first and last item been selected.

I am considering of changing all my SP6 listview to SP2 listview, because the SP2 listview is what I am looking for. Would anyone recommend using the older version rather than the newer version? I would also like to know what has been changed within these two versions? If using the older version, will it affect the installation process in client machines?
Question by:guest321
    LVL 27

    Assisted Solution

    Hi guest321,
    I would strongly suggest you do NOT downgrade!
    Just by going into (Custom) on each control, you will notice the addtions to the SP6 one.
    From memory, things like FullRowSelect and GridLines would probably be reason enough.
    As to your problem, probably it is possible to overcome. Have you tried checking or unchecking the "Hide Selection" property?


    Author Comment

    Hi Dabas.

    I've tried the "Hide Selection" property, but it doesn't work, it will only hide the selected/highlighted items in the listview when lost focus. :/

    Author Comment

    I am busy downloading Visual Studio Service Pack 6, will this update help?
    LVL 27

    Expert Comment

    > I am busy downloading Visual Studio Service Pack 6, will this update help?
    I hope so! Let me know

    LVL 9

    Assisted Solution

    Two things,

    If you use a manifest file to give your application a windows XP look, the use the old (SP2) version, cause that one will get the WIndows XP look, the new one does not.
    In the SP6 listview, listsubitems have more options.

    And there are of course some other differences.
    LVL 12

    Accepted Solution

    I agree with p_sie.
    Version 5.0 (COMCTL32.OCX) is link with COMCTL32.DLL which is the main common controls library and the library for XP style
    Version 6.0 (MSCOMCTL.OCX) is not link with Comclt32.dll

    It is also true that version 6.0 has more options or features, and the following lists some
    of the new features (Properties and Methods) in version 6.0 that are not in version 5.0:

    Main ListView Control

    The ListItems Object

    Author Comment

    Thanks for the help guys!

    I've decided to combine 2 different versions of controls in my application (hope this won't give me problems in later stage), regarding the listview, I've used some API calls to achieve the same effects as the version 6.0 have.

    As for SP6, I haven't install it yet, because I read a few posts stating there are some problems came with SP6, I will need to make sure before I install it.
    LVL 12

    Expert Comment

    Thanks for the A grade, guest321.

    You really should install the SP6. I've been using it since it was available and haven't encountered any problem at all.
    Also, you can use both Common Controls v5.0 and 6.0 together. I've done that too with no problem.

    Featured Post

    Free Trending Threat Insights Every Day

    Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

    Join & Write a Comment

    Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
    If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
    Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
    Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

    734 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    19 Experts available now in Live!

    Get 1:1 Help Now