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'.
 

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

Back
Top