"Winforms ListItem" - or "how to Select items in a Listbox"
Posted on 2004-10-01
I'm going batty trying to programatically highlight items allready in a listbox in a windows app.
I temporarily discovered ListItem, only to realize it's a webforms thing.
What I want it something like this, but that works in a windows app:
Sub HighlightItem (strLine)
Dim lstObj as ListItem
For Each lstObj In Me.lstInstrumentTypes.Items
If lstObj.Text = strLine Then
lstObj.Selected = True
Yes, I know about the ListView control.