As you know by question that what I want. I was using listbox. In ListBox
we can get selected item by a simple line of code:
listbox1.SelectedItem
.
If you want to select the same item in a listbox
using a listview
, you can use:
Private Sub ListView1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ListView1.SelectedIndexChanged
For aa As Integer = 0 To ListView1.SelectedItems.Count - 1
ListBox1.SelectedIndex = ListView1.SelectedIndices(aa)
Next
End Sub