How to turn off highlighting in a Checkbox style List Box in VB6

Posted on 2005-05-04
Last Modified: 2013-12-26
I have a ListBox in VB6 that I've set to a checkbox style.  When I add an item to the list box, that item appears with an empty checkbox but the item is highlighted.  Also, when I select an item (click on the check box) the selected item is also highlighted.  Is there a way to turn highlighting off altogether on the List Box?
Question by:planetiowa
    LVL 10

    Accepted Solution

    LVL 14

    Expert Comment

    by:Shiju Sasidharan
    What about using a ListView Control instead list box
    Goto Project Menu -> Controls
    and sellect Microsoft Common Windows Controls 6.0
    now place a listview control to ur form and try this code
    Private Sub Form_Load()
    Dim ls As ListItem
    Dim i
    ListView1.View = lvwReport
    ListView1.CheckBoxes = True
    ListView1.ColumnHeaders.Add , , "Test Column"
    For i = 1 To 10
        Set ls = ListView1.ListItems.Add(, , "Item " & i)
    Next i
    End Sub


    Featured Post

    Threat Intelligence Starter Resources

    Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

    Join & Write a Comment

    Introduction I needed to skip over some file processing within a For...Next loop in some old production code and wished that VB (classic) had a statement that would drop down to the end of the current iteration, bypassing the statements that were c…
    Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
    Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
    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

    24 Experts available now in Live!

    Get 1:1 Help Now