ListView-ItemClick

S

Storm

Try the MouseDown event. The e argument passed allows you to get the item that was clicked, from it's coordinates by using the GetItamAt method. Like this:

Private Sub ListView1_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles ListView1.MouseDown

Dim n As ListViewItem
n = ListView1.GetItemAt(e.X, e.Y)
MsgBox(n.Checked)

End Sub

Be warned, this only works when the ListView has the Veiw property set to Details

ListView1View.Details
 
T

thanhannt

Hi Storm,
Have you ever tried the event of listview (in PocketPC), fires when
pushing an item for a while, and a red circle appears ?
Thanks.
 
B

Boris Nienke

You mean "Tab&Hold" - try using the OnPopup Event (or similar)
When you add a PopupMenu to the ListView you can open up a Menu when you
tab&hold an item. Maybe the event is called too so you could do anything
you like

Boris
 
T

thanhannt

Thanks alot , Boris !

Boris Nienke said:
You mean "Tab&Hold" - try using the OnPopup Event (or similar)
When you add a PopupMenu to the ListView you can open up a Menu when you
tab&hold an item. Maybe the event is called too so you could do anything
you like

Boris
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top