Click here to Skip to main content
16,005,149 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: Extract Data from A WebSite through a WebBrowser Control? Pin
Kessica8-May-06 1:34
Kessica8-May-06 1:34 
QuestionSql File in DLL problem Pin
anom2m6-May-06 23:37
anom2m6-May-06 23:37 
AnswerRe: Sql File in DLL problem Pin
Rizwan Bashir7-May-06 21:34
Rizwan Bashir7-May-06 21:34 
GeneralRe: Sql File in DLL problem Pin
anom2m17-May-06 0:45
anom2m17-May-06 0:45 
GeneralRe: Sql File in DLL problem Pin
Rizwan Bashir17-May-06 5:32
Rizwan Bashir17-May-06 5:32 
QuestionA question about event handlers Pin
carloqueirolo6-May-06 21:18
carloqueirolo6-May-06 21:18 
AnswerRe: A question about event handlers Pin
Robert Rohde6-May-06 21:51
Robert Rohde6-May-06 21:51 
GeneralRe: A question about event handlers Pin
carloqueirolo6-May-06 22:04
carloqueirolo6-May-06 22:04 
Hi Robert,

1. if the event is within the same class than a call to
GetInvocationList will give you an array of Delegates.
I think the compiler will not accept this when calling it on an
event defined outside the current class. You might nevertheless
reach it via Reflection.

Absolutely right! I've found a lot of samples that uses MyEventEvent.GetInvocationList(). Unfortunately for me, they are all inspecting events INSIDE the same class where they are declared. In my case, I need to find a list of eventhandlers for an event of a given object used elsewhere. The MyControl1.Parent.Paint sample is not casual...
Do you have an idea on how solve it using Reflection?


2. Not possible. An event is simply a collection of references
to methods and the referenced methods don't know anything about
it.

I agree. But what I'm thinking is that the compiler exactly knows that a procedure is attached to an event.

However, for me is much more important to solve #1.

As you can see in the first three lines of my sample, lines 2 and 3 are useless. In fact, if MyControl1, MyContro2 and MyContro3 are inside the SAME parent, PaintParentHandler1 is called three times, while only the first time is needed.

Thank you for any suggestion...

carlo

-- modified at 4:07 Sunday 7th May, 2006
GeneralRe: A question about event handlers Pin
Robert Rohde7-May-06 20:26
Robert Rohde7-May-06 20:26 
GeneralRe: A question about event handlers Pin
carloqueirolo7-May-06 21:15
carloqueirolo7-May-06 21:15 
QuestionDataGridView - SortCompare event not firing! Pin
nzmike6-May-06 18:08
nzmike6-May-06 18:08 
AnswerRe: DataGridView - SortCompare event not firing! Pin
nzmike6-May-06 20:04
nzmike6-May-06 20:04 
Questiontime stamp value Pin
_tasleem6-May-06 10:48
_tasleem6-May-06 10:48 
Questionpopulating the Combo box with database tables Pin
Hafiz_Akbar_Ali6-May-06 8:39
Hafiz_Akbar_Ali6-May-06 8:39 
Questionformat(now,"dd/mm/yyyy") not working in vb.net Pin
pptadam6-May-06 6:52
pptadam6-May-06 6:52 
AnswerRe: format(now,"dd/mm/yyyy") not working in vb.net Pin
Joshua Quick6-May-06 9:17
Joshua Quick6-May-06 9:17 
QuestionValidate data in a table Pin
phokojoe6-May-06 3:12
phokojoe6-May-06 3:12 
AnswerRe: Validate data in a table Pin
mr_123456-May-06 10:04
mr_123456-May-06 10:04 
GeneralRe: Validate data in a table Pin
phokojoe7-May-06 1:32
phokojoe7-May-06 1:32 
GeneralRe: Validate data in a table Pin
phokojoe9-May-06 22:47
phokojoe9-May-06 22:47 
QuestionReading from notepad File Pin
Mr kilany6-May-06 3:08
Mr kilany6-May-06 3:08 
AnswerRe: Reading from notepad File Pin
Colin Angus Mackay6-May-06 3:15
Colin Angus Mackay6-May-06 3:15 
AnswerRe: Reading from notepad File Pin
kkppttoo7-May-06 0:49
kkppttoo7-May-06 0:49 
Questiondouble rows Pin
microuser_20006-May-06 2:03
microuser_20006-May-06 2:03 
QuestionCopy Objects - Am I missing something? Pin
Kaditcher6-May-06 1:07
Kaditcher6-May-06 1:07 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.