我试过了: 如果ListBox1.Items.Contains(“myword”)那么 如果ListBox1.SelectedIndex = ListBox1.Items.IndexOf(“myword”)则 如果ListBox1.SelectedItems.Item(“myword”)那么 但没有效果. 尝试这样的事情, listbox.i
>如果ListBox1.Items.Contains(“myword”)那么
>如果ListBox1.SelectedIndex = ListBox1.Items.IndexOf(“myword”)则
>如果ListBox1.SelectedItems.Item(“myword”)那么
但没有效果.
尝试这样的事情, listbox.items物业是 ListBox.ObjectCollection:For Each i As Object In ListBox1.SelectedItems If CStr(i).Contains("myword") Then BackColor = Color.Blue ' Do your logic here, I just used setting the BackColor for a test End If Next