Suspend Events

  • Thread starter Thread starter alexandre
  • Start date Start date
A

alexandre

Hi,

Is there any function that Suspend all events for the Control object ?

thanks
 
* "alexandre said:
Is there any function that Suspend all events for the Control object ?

Remove the handlers using 'RemoveHandler' (in VB.NET).
 
You need to use "-=" (minus equals):
this.button1.Click -= new System.EventHandler(this.button1_Click);

.... this is just the opposite of wiring it up:
this.button1.Click += new System.EventHandler(this.button1_Click);
 

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