event handling question (newbie stuff)

  • Thread starter Thread starter John Salerno
  • Start date Start date
J

John Salerno

Ok, I understand all the parts of how to create an event handler and
wire it to the event, but I'm still unsure where this code goes. Do both
of these things go into the class of the object? Or is it put in the
form class? (E.g., if it's a button's click event, where does this code go?)
 
Hi John,
the object will raise the event but there could possibly be multiple
listeners so you could have multiple event handling methods, going in
multiple different locations.

In the case of a button's click event the event handling code would go
inside the form in most cases as this is where you want to handle the event
and update the gui etc based upon the click action.

Mark R Dawson
 
Back
Top