|
-
December 14th, 2009, 06:08 AM
#1
.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
-
December 16th, 2009, 11:05 AM
#2
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
...at present time, using mainly Net 4.0, Vs 2010
Special thanks to Lothar "the Great" Haensler, Chris Eastwood , dr_Michael, ClearCode, Iouri and
all the other wonderful people who made and make Codeguru a great place.
Come back soon, you Gurus.
-
December 19th, 2009, 09:03 AM
#3
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
-
December 19th, 2009, 06:42 PM
#4
Re: .Net Conversion
You can do the same in VB
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|