By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,534 Members | 950 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,534 IT Pros & Developers. It's quick & easy.

Events at runtime...

P: n/a
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
Nov 20 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
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

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

"VJ" <vi********@yahoo.com> wrote in message
news:%2****************@TK2MSFTNGP11.phx.gbl...
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

Nov 20 '05 #2

P: n/a
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

"Ken Tucker [MVP]" wrote:
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

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

"VJ" <vi********@yahoo.com> wrote in message
news:%2****************@TK2MSFTNGP11.phx.gbl...
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

Nov 21 '05 #3

P: n/a
On Fri, 1 Oct 2004 07:45:01 -0700, Luca Martinetti - Phatsoft wrote:
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.
Nov 21 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.