Microsoft Communities

Welcome to WindowsClient.net | Sign in | Join

Here are some frequently asked questions about Windows Forms and their answers.

Windows Forms FAQs

Why doesn't an item in a ListView get selected when I set ListViewItem.Selected to true?

Make sure the ListView has focus when you set the Selected property. For example, if this code is in the click handler for a button, this button will have the focus, and the selection in the list will fail. Set the focus back to the list before you set the Selected property.

Contributed from George Shepherd's Windows Forms FAQ



Page view counter