-
.Net Conversion
Can someone tell me what the Equilivent is in .net of the following Event
Code:
Private Sub ListView_ItemDblClick(Item As ListItem)
End Sub
I need to know when the user Double Clicks on an icon in a ListView, there doesn't seem to be a matching event in .net.
I'm running VS 2008
-
Re: .Net Conversion
windows form? Should be:
Code:
Private Sub ListView1_DoubleClick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ListView1.DoubleClick
End Sub
the point is: not the name of the routine, like in Vb6, but the Handles make this routine triggers when the user perform that action.
If you neeed to bind a routine at runtime to an event, take a look at the
AddHadler (and RemoveHandler) keyword in help
-
Re: .Net Conversion
Thanks i know about The "ListView_DoubleClick()" event
but that is triggered when the user clicks anywhere on the listview, i need an item specific event there only seems to be one for a single click
Code:
ListView_ItemSelectionChanged(ByVal sender As Object, ByVal e As System.Windows.Forms.ListViewItemSelectionChangedEventArgs) Handles ListView.ItemSelectionChanged
And i know about AddHandler, that seems to be how its done in C# and other languages
-
Re: .Net Conversion
You can do the same in VB