Solved

VB 2005 ListView - Selected row disappears when clicking on other controls

Posted on 2007-11-25
4
279 Views
Last Modified: 2013-12-25
Hi

I have a ListView control on a windows form. When I click on another control, the selected row (or greay shading on this) dissapears.

I want it to stay there. How do I do this?
0
Comment
Question by:murbro
  • 2
4 Comments
 
LVL 10

Expert Comment

by:effx
ID: 20345793
ListView.SetFocus
0
 

Author Comment

by:murbro
ID: 20348960
Hi

I want the selected line in the ListView to show as selected even when the ListView no longer has the focus
0
 
LVL 48

Accepted Solution

by:
jpaulino earned 500 total points
ID: 20351388
You have to change the property HideSelection to False

Listview1.HideSelection = False

jpaulino
0
 

Author Closing Comment

by:murbro
ID: 31410849
Thanks very much
0

Featured Post

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

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 need to start windows update installation remotely or as a scheduled task you will find this very helpful.
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…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

707 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

16 Experts available now in Live!

Get 1:1 Help Now