Capturing event...
-
Hi there I don´t know exactly if you want this, but you can capture the event of the class with 2 ways: First: The declaration of the class is not in a function, it´s a global var. You can declare it like that: Private WithEvents Client as ClientClass And then you can set the handler of the event in a function, like that: Private sub OnClientLogin (sender as object, e as eventArgs) handles Client.Login Or you can set hte handler in the code: Private sub SetClientEvents() ..... addHandler Client.Login, addressof OnClientLogin ..... end sub Second: If you have a class declared in the method, you can use addhandler Private sub AddClient() ... dim Client as ClientClass ... addhandler Client.Login, addressof OnClientLogin ... end sub -------------- I think that is it what you want.
----- LeandroAB