Hi, thanks for helping.

All this code does is remove the checked items. I want to remove it from one listview box and transfer it to another. Is that possible?

Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
        With ListView1
            If .CheckedItems.Count > 0 Then
                For checked As Integer = .CheckedItems.Count - 1 To 0 Step -1
                    .Items.Remove(.CheckedItems(checked))
                Next
            End If
        End With
    End Sub

Edited 6 Years Ago by tusharbhatia: code tags missing

See if this helps.

For Each lvItem As ListViewItem In ListView1.Items
            If lvItem.Checked = True Then
                Dim newLvItem As New ListViewItem(lvItem.Text)
                '//-- if it contains subitems. --\\
                'newLvItem.SubItems.Add(lvItem.SubItems(1).Text)
                'newLvItem.SubItems.Add(lvItem.SubItems(2).Text)
                ListView2.Items.Add(newLvItem)
                ListView1.Items.Remove(lvItem)
            End If
        Next

ListView1.BeginUpdate()
ListView2.BeginUpdate()
For Each li As ListViewItem In ListView1.CheckedItems
ListView1.Items.Remove(li)
ListView2.Items.Add(li)
Next
ListView1.EndUpdate()
ListView2.EndUpdate()

Ok, I understand now. Thanks Codeorder. :)

Edited 6 Years Ago by tusharbhatia: n/a

dim listviewitem as new listviewitem
listviewitem= Me.listview1.SelectedItems.Item(0)
listview2.Items.Add(listviewitem.Clone())

?

This question has already been answered. Start a new discussion instead.