J
Jensen Hoh
How can I remove a event handle dynamically?
I knew that, it is the proper way to add a event handler for a control
Add Handler
-----------------------------------------------
this.button1.Click += new System.EventHandler(this.button1_Click);
Remove Handler
------------------------------------------------
button1.Click -= new System.EventHandler(button1_Click);
But I want some other way which is more easy, which doesn't need to
supply the old method pointer(name) in the procedure..
A good example is like example below ( written in Delphi )
button1.onClick := nil;
Does anyone can help me or give me a hint. TQ...
I knew that, it is the proper way to add a event handler for a control
Add Handler
-----------------------------------------------
this.button1.Click += new System.EventHandler(this.button1_Click);
Remove Handler
------------------------------------------------
button1.Click -= new System.EventHandler(button1_Click);
But I want some other way which is more easy, which doesn't need to
supply the old method pointer(name) in the procedure..
A good example is like example below ( written in Delphi )
button1.onClick := nil;
Does anyone can help me or give me a hint. TQ...