Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium


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

Posted on 2005-05-04
Medium Priority
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

edwardiii earned 500 total points
ID: 13932829
LVL 14

Expert Comment

by:Shiju Sasidharan
ID: 13934111
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

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
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…

577 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