There is no difference in handling events between VC, C# and C++/CLI, except of syntax.
Generally, every event handler can be canceled by using -+ operator. For example, this line adds event handler:
button1.Click += new EventHandler(this.button1_Click);
This line removes event handler:
button1.Click -= new EventHandler(this.button1_Click);
However, removing all event handlers on startup and adding them again looks like hard way, startup flag is better solution.
|