Clearing an Event

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

A quick question...

In my program I handle an event, but the way it is programed the event gets "handled" twice. Is there a way to clear the event after it is handled the first time

Thank
Brad
 
Hi Brad,

You can either set a switch (the most simple method) or otherwise remove the
handler temporary (the most difficult method).

Did you know the static keyword which is very usable for a switch, with that
you do not have to set it public but can keep it in your procedure something
as.

static myswitch as boolean

if myswitch then
'do what you want
myswitch = false

I hope this helps?

Cor
 
* "=?Utf-8?B?QnJhZA==?= said:
In my program I handle an event, but the way it is programed the event
gets "handled" twice. Is there a way to clear the event after it is
handled the first time.

If your event is called 'Foo', then you can use 'FooEvent' to get "more
options". There you can get the 'InvocationList', add handlers
('Combine') and remove handlers using 'Remove'.
 
Back
Top