Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/visual-studio-2008/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Vb.net 如何从CheckedListbox检索突出显示的项目_Vb.net_Visual Studio 2008_Highlight - Fatal编程技术网

Vb.net 如何从CheckedListbox检索突出显示的项目

Vb.net 如何从CheckedListbox检索突出显示的项目,vb.net,visual-studio-2008,highlight,Vb.net,Visual Studio 2008,Highlight,在VisualStudio中,无论何时选择项目,该项目都会高亮显示。我想利用此属性检索当前高亮显示的选中项(在checkedlistbox中的所有项中) 这个操作可能吗?CheckedListBox控件在我看来总是半生不熟的,所以我不经常使用它 类似这样的工作原理: With CheckedListBox1 If .SelectedIndex > -1 Then If .CheckedIndices.Contains(.SelectedIndex) Then Mes

在VisualStudio中,无论何时选择项目,该项目都会高亮显示。我想利用此属性检索当前高亮显示的选中项(在checkedlistbox中的所有项中)


这个操作可能吗?

CheckedListBox控件在我看来总是半生不熟的,所以我不经常使用它

类似这样的工作原理:

With CheckedListBox1
  If .SelectedIndex > -1 Then
    If .CheckedIndices.Contains(.SelectedIndex) Then
      MessageBox.Show(.SelectedItem.ToString & " is checked.")
    Else
      MessageBox.Show(.SelectedItem.ToString & " is not checked.")
    End If
  End If
End With