Solved

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

Posted on 2007-11-25
4
290 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:Murray Brown
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 10

Expert Comment

by:effx
ID: 20345793
ListView.SetFocus
0
 

Author Comment

by:Murray Brown
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:Murray Brown
ID: 31410849
Thanks very much
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

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…
Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
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…
Suggested Courses
Course of the Month4 days, 1 hour left to enroll

630 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