Hi Jake,
There is no best place. It depends on the scope and lifetime of the object.
If the object is created by a class when the class is created, and if the
object will remain useable for as long as the class that contains it, then
registering event handlers in the class's constructor is usually suitable.
If the object will be useable after the class that contains it has been
disposed then be sure to unregister the event handlers in the class's
dispose method.
If the object is created in some method rather than the class's constructor
then register the event handlers when the object is created in the method.
--
Dave Sexton
"Jake K" <no*****@address.comkwrote in message
news:%2****************@TK2MSFTNGP06.phx.gbl...
Where is the best place to define event handlers? I need to define event
handlers for a COM object referenced in my project and am doing so in the
fowm load. Is this the best place?