VB Code:
'Form1
Option Explicit
Public ITM As ListItem
Private Sub Form_Load()
Dim i%
For i = 1 To 10
ListView1.ListItems.Add i, "K" & i, "New Item " & i, "file"
Next i
Form2.Show
End Sub
Private Sub ListView1_ItemClick(ByVal Item As MSComctlLib.ListItem)
Set ITM = ListView1.ListItems(ListView1.SelectedItem.Index)
End Sub
Private Sub ListView1_MouseDown(Button As Integer, Shift As Integer, x As Single, y As Single)
ListView1.OLEDrag
End Sub
'Form2
Private Sub ListView1_OLEDragDrop(Data As MSComctlLib.DataObject, Effect As Long, Button As Integer, Shift As Integer, x As Single, y As Single)
'=============================================
Dim i%, k$, t$, ic
i = ListView1.ListItems.Count + 1
With Form1.ITM
k = .Key
t = .Text
ic = .Icon
End With
ListView1.Icons = Form1.ImageList1
ListView1.ListItems.Add i, k, t, ic
End Sub