Dim Flag As Boolean
Private Sub ListViewOther_ItemClick(ByVal Item As MSComctlLib.ListItem)
flag = True
End SubPrivate Sub ListViewOther_MouseDown(Button As Integer, Shift As Integer, x As Single, y As Single)
If flag = True Then
If Button = 2 Then
MsgBox ListViewOther.SelectedItem.ListSubItems(2)'"记录的反馈!"
End If
End If
End Sub
Private Sub ListViewOther_ItemClick(ByVal Item As MSComctlLib.ListItem)
flag = True
End SubPrivate Sub ListViewOther_MouseDown(Button As Integer, Shift As Integer, x As Single, y As Single)
If flag = True Then
If Button = 2 Then
MsgBox ListViewOther.SelectedItem.ListSubItems(2)'"记录的反馈!"
End If
End If
End Sub
可以用TreeView
那里有Notes集合,并且有note对象被点击的事件。
private curx as long,cury as long
'在ListView的MouseMove事件里面写上:
curx=x:cury=y
'在ListView的Click事件里面写上:
dim lvItem as listitem
set lvItem=ListView1.HitTest(curx,cury)
if lvitem is nothing then '点击的是空白区域
exit sub
else'点击在Item上
msgbox "你点击的是:" & lvItem.caption & "项目"
end if
set lvItem=nothing
http://www.csdn.net/expert/topic/251/251400.shtm