回复 2楼 cwa9958
下面是VsListView的实例,通过这个实例可以知道VsListView控件的基本操作
https://pan.baidu.com/s/1gRUDlPZnC9uFgM5MzBXi5A 提取码2qaz
下面是我自己写的右键单击代码:
Private Sub vsListView1_MouseDown(Button As Integer, Shift As Integer, x As Single, y As Single)
If Button = 1 Then
SelectIndex = vsListView1.ItemHitTest(x, y)
ElseIf Button = 2 Then
SelectIndex = vsListView1.ItemHitTest(x, y)
If SelectIndex >= 0 Then
PopupMenu mnuFile, 2
End If
End If
End Sub