Event Hanlding help required

  • Thread starter Thread starter John Veldthuis
  • Start date Start date
J

John Veldthuis

I have some code that I need to implement an event handler in VB. Here is
the C# code

this.listBar1.ItemClicked += new
ItemClickedEventHandler(listBar1_ItemClicked);

Can anyone help me change this over to VB? Everything I have tried comes up
with errors. It is a listbar from vbAccelerator site.

Cheers
 
Hi John,

I first thought you where Dutch, probably you know that your name
translated is "field at home". What could be a nickname for the sunday.
this.listBar1.ItemClicked += new
ItemClickedEventHandler(listBar1_ItemClicked);
Translating this, is one of the easiest by the way.

Addhandler me.listbar1.ItemClicked, addressof listbar_ItemClicked

You can as well set where probably is something as "private listBar1 as
listbar" this "private withevents listBar1 as listbar" and than use the
standard VBNet way. They both work and it depends where I use them.

I hope this helps,

Cor
 
John Veldthuis said:
I have some code that I need to implement an event handler in VB. Here is
the C# code

this.listBar1.ItemClicked += new
ItemClickedEventHandler(listBar1_ItemClicked);

Can anyone help me change this over to VB?

In addition to the other replies: I suggest you to take a look at the
according chapter in the documentation:

Visual Basic Language Concepts -- Events and Delegates
<URL:http://msdn.microsoft.com/library/en-us/vbcn7/html/vaconEventsDelegatesInheritance.asp>
 

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

Back
Top