Events at runtime...


V

VJ

I can't find my posting that had replies to events at runtime.. hence I am
posting as new.

I did earlier read all your replies. Thanks for the information. I still
have not tried them. My requirement is that i need to see a list of events
attached to a control at runtime. I did see a reply on Reflection, if you
could provide me with some links that would be great..

Thanks
Vijay
 
Ad

Advertisements

K

Ken Tucker [MVP]

Hi,

Dim t As Type = GetType(Button)

Debug.WriteLine("Properties")

Debug.WriteLine("----------")

For Each pi As Reflection.PropertyInfo In t.GetProperties

Debug.WriteLine(pi.Name)

Next

Debug.WriteLine("Methods")

Debug.WriteLine("----------")

For Each mi As Reflection.MethodInfo In t.GetMethods

Debug.WriteLine(mi.Name)

Next

Debug.WriteLine("Events")

Debug.WriteLine("----------")

For Each ei As Reflection.EventInfo In t.GetEvents

Debug.WriteLine(ei.Name)

Next



Ken

----------------------------

I can't find my posting that had replies to events at runtime.. hence I am
posting as new.

I did earlier read all your replies. Thanks for the information. I still
have not tried them. My requirement is that i need to see a list of events
attached to a control at runtime. I did see a reply on Reflection, if you
could provide me with some links that would be great..

Thanks
Vijay
 
G

Guest

Hi,
Just another question about reflection and events:

Is it possible to wire handlers to events taken via reflection?
In my case I'm trying to link my interface application to events exposed in
another assembly loaded at runtime.

Thanks for the support.

Luca Martinetti
Phatsoft Inc. Vp of Technical
 
Ad

Advertisements

C

Chris Dunaway

Is it possible to wire handlers to events taken via reflection?
Yes, look at the AddHandler and RemoveHandler methods.

--
Chris

dunawayc[AT]sbcglobal_lunchmeat_[DOT]net

To send me an E-mail, remove the "[", "]", underscores ,lunchmeat, and
replace certain words in my E-Mail address.
 

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