Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problem with MouseEventHandler

Status
Not open for further replies.

a4l100

MIS
Nov 12, 2002
8
0
0
DE
Hello,

I try to program an event handler for a mouse drag and drop. I have the following c# code and I want to translate it to vb.net.

c#:
ListBox1.MouseDown += New MouseEventHandler(ListBox_MouseDown)

private void ListBox_MouseDown(object sender, MouseEventArgs e)
{
}

vb.net:
Dim MouseDown As New MouseEventHandler(AddressOf Listbox_MouseDown)

Private Sub ListBox_MouseDown(ByVal sender As System.Object, ByVal e As MouseEventArgs)
...
End Sub

The failure is in the AddressOf statement, but Listbox_MouseDown is correct, or not??

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top