Event handling

K

kevinforbes

I have one dll and one exe/assembly that references the dll.

DLL contains:
- one class (class1)
- one module (mod1) - which contains several events that I need

EXE/Assembly instantiates class1, how do I get the events when they are
raised from mod1?

I can't add a handler to a module event and I can't handle the event
from class1 as a module can't be declared "WithEvents".

I'm stuck, any help would be much appreciated.

thanks in advance,
KF
 
C

Cesar Ronchese

Events in a module? Try rethink your application, something can be wrong.

But you can try use the AddHandler statement to capture module events:



'here you can call the AddHandler
(...)
AddHandler MyModule.OnSomeEvent, AddressOf HandleSomeEvent
(...)

'here is your event handler
private sub HandleSomeEvent()
(...)
end sub


--
[]s
Cesar
Carsoft Consultoria e Sistemas
www.carsoftnet.com.br





I have one dll and one exe/assembly that references the dll.

DLL contains:
- one class (class1)
- one module (mod1) - which contains several events that I need

EXE/Assembly instantiates class1, how do I get the events when they are
raised from mod1?

I can't add a handler to a module event and I can't handle the event
from class1 as a module can't be declared "WithEvents".

I'm stuck, any help would be much appreciated.

thanks in advance,
KF
 

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

Top