Link to home
Start Free TrialLog in
Avatar of MarcGraff
MarcGraffFlag for United States of America

asked on

system.EventHandler with variable

Is there any what to attach a variable to an event handler?

IE:
oEventHandler = New System.EventHandler(AddressOf ChangeInstance(i))

Thanks!
   - Marc
Avatar of gregoryyoung
gregoryyoung
Flag of Canada image

not sure which side you are asking for here ...

dim foo as new EventHandler(AddressOf MyRoutine)

is fine ...

New System.EventHandler(AddressOf ChangeInstance(i)) this is not ... what exactly are you trying to do here? is ChangeInstance(i) accessing an array of event handlers or are you trying to tell it to pass some arbitrary value i to the event when it run?


ASKER CERTIFIED SOLUTION
Avatar of b1xml2
b1xml2
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of MarcGraff

ASKER

gregoryyoung:

What I am attempting to accomplish is to have a form that is a single record in a table. I want a menu that has an entry (menu item) for each record in the table. There for I want to send the index of the record in the table along with the on click event of the menu.

b1xml2:
Hmm ok, that is a bit advanced for me but I will give it a shot.

Thanks!
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks! With some effort I've got it! Thanks so much!

   - Marc