Not the best example mind you....but it works....lots of other tests need to be added, but I just coded it up for you quickly:
Add One listview (two columns), two text boxes, one command button and paste this code Leave the names default:
What you're looking for is the listview.selecteditemindices which returns a System.Windows.Forms.ListView.SelectedIndexCollection
[edit] damn vb.net ide [/edit]
Add Two Class Vars:
'class variable for storing list view's current selected item index
Dim myListIndex As System.Windows.Forms.ListView.SelectedIndexCollection
'class vairable for storing list view's current selected item
Dim itmx As System.Windows.Forms.ListViewItem
Add the following to the form_load event:
Dim myx As System.Windows.Forms.ListViewItem
Dim i As Integer = 0
Dim j As Integer = 10
For i = 0 To j
myx = Me.ListView1.Items.Add("Decription # " & i)
myx.SubItems.Add("Price = $" & i * 2 & ".00")
Next
'change button's format
Me.Button1.Text = "Update The Stuff"
Me.TextBox1.Text = ""
Me.TextBox2.Text = ""
add the following to the listview1_click event
'get the selected indexes from the listview
myListIndex = Me.ListView1.SelectedIndices
'single select list box.....all we care is the count of selected items is > 1
If myListIndex.Count > 0 Then
'get the first one in the global listindex var
itmx = Me.ListView1.Items(myListIndex(0))
'set the text boxes to the current values of the selected item
Me.TextBox1.Text = itmx.SubItems(0).Text
Me.TextBox2.Text = itmx.SubItems(1).Text
End If
add the following to the button1_click event
If (Me.TextBox1.Text <> vbNullString) And (Me.TextBox2.Text <> vbNullString) Then
If Not itmx Is Nothing Then
itmx.SubItems(0).Text = Me.TextBox1.Text
itmx.SubItems(1).Text = Me.TextBox2.Text
End If
End If