473,386 Members | 1,734 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Event handling

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

Nov 21 '05 #1
1 905
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

<ke*********@gmail.com> wrote in message
news:11**********************@o13g2000cwo.googlegr oups.com...
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
Nov 21 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Eric | last post by:
How can I dynamically assign an event to an element? I have tried : (myelement is a text input) document.getElementById('myelement').onKeyUp = "myfnc(param1,param2,param3)"; ...
18
by: Christopher W. Douglas | last post by:
I am writing a VB.NET application in Visual Studio 2003. I have written a method that handles several events, such as closing a form and changing the visible status of a form. I have some code...
19
by: Christopher W. Douglas | last post by:
I am writing a VB.NET application in Visual Studio 2003. I have written a method that handles several events, such as closing a form and changing the visible status of a form. I have some code...
18
by: Christopher W. Douglas | last post by:
I am writing a VB.NET application in Visual Studio 2003. I have written a method that handles several events, such as closing a form and changing the visible status of a form. I have some code...
2
by: preetityagi | last post by:
I am unable to change the ads in adrotator placed inside the update panel. for some reason timer1_click event is not firing. f<%@ Page Language="C#" AutoEventWireup="true" ...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.