如何在活动中删除所有处理程序? [英] How Remove All Handler on a event?

查看:52
本文介绍了如何在活动中删除所有处理程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何删除事件上的所有处理程序?

删除myButton上的所有处理程序。点击。

谢谢


______________________________

Franky
Fr ****** *********@hotmail.com

How Remove All Handler on a event?
Like remove all handler on the myButton.Click.
Thanks

______________________________
Franky
Fr***************@hotmail.com

推荐答案

RemoveHandler Button1.Click,AddressOf Button1_Click

-


OHM(特里伯恩斯)

。 。 。单手人。 。

如果你需要我的电子邮件,请问我


当你不知道自己在做什么时,过得很快


" Franky" < FR *************** @ hotmail.com>在消息中写道

新闻:uA **************** @ TK2MSFTNGP15.phx.gbl ...
RemoveHandler Button1.Click, AddressOf Button1_Click
--

OHM ( Terry Burns )
. . . One-Handed-Man . . .
If U Need My Email ,Ask Me

Time flies when you don''t know what you''re doing

"Franky" <fr***************@hotmail.com> wrote in message
news:uA****************@TK2MSFTNGP15.phx.gbl...
如何全部删除关于活动的处理程序?
喜欢删除myButton上的所有处理程序。点击。

谢谢

______________________________
Franky
星期五*************** @ hotmail.com
How Remove All Handler on a event?
Like remove all handler on the myButton.Click.
Thanks

______________________________
Franky
Fr***************@hotmail.com



是的,如果他们有一个处理程序调用Button1_Click ...


但是如果处理程序是不是Button1_Click而是其他东西或者他们有2个

或3个处理程序?


你怎么能删除所有处理程序?


Franky


单手男子(OHM - Terry Burns) < news.microsoft.com>在消息中写道

news:u%**************** @ TK2MSFTNGP15.phx.gbl ...
Yes if they have ONE handler call Button1_Click...

But if the handler is not Button1_Click but something else or iy they have 2
or 3 handler?

How can you Remove all Handler ?

Franky

"One Handed Man ( OHM - Terry Burns )" <news.microsoft.com> wrote in message
news:u%****************@TK2MSFTNGP15.phx.gbl...
RemoveHandler Button1点击,地址按钮1_点击

-

OHM(特里伯恩斯)
。 。 。单手人。 。
如果你需要我的电子邮件,请问我

当你不知道自己在做什么时,过得很快

Franky < FR *************** @ hotmail.com>在消息中写道
新闻:uA **************** @ TK2MSFTNGP15.phx.gbl ...
RemoveHandler Button1.Click, AddressOf Button1_Click
--

OHM ( Terry Burns )
. . . One-Handed-Man . . .
If U Need My Email ,Ask Me

Time flies when you don''t know what you''re doing

"Franky" <fr***************@hotmail.com> wrote in message
news:uA****************@TK2MSFTNGP15.phx.gbl...
如何删除事件上的所有处理程序?
喜欢删除myButton上的所有处理程序。点击。

谢谢

______________________________
Franky
Fr *************** @ hotmail.com
How Remove All Handler on a event?
Like remove all handler on the myButton.Click.
Thanks

______________________________
Franky
Fr***************@hotmail.com




*" Franky" < FR *************** @ hotmail.com> scripsit:
* "Franky" <fr***************@hotmail.com> scripsit:
如何删除事件上的所有处理程序?
像删除myButton上的所有处理程序。点击。
How Remove All Handler on a event?
Like remove all handler on the myButton.Click.




如果你自己定义事件:


让我们假设您定义了''Foo''事件。然后VB.NET将自动生成一个名为''FooEvent'的委托变量。
这个

变量提供了一个''GetInvocationList''方法,可以用来获得连接到事件的所有处理程序的
。您可以使用委托'

''删除''方法删除

其他后连接到该事件的一个代表。


-

MS Herfried K. Wagner

MVP< URL:http://dotnet.mvps.org/>

VB< URL:http://dotnet.mvps.org/dotnet/faqs/>



If you are defining the event yourself:

Let''s assume that you defined the ''Foo'' event. Then VB.NET will
generate a delegate variable called ''FooEvent'' automatically. This
variable provides a ''GetInvocationList'' method that can be used to get
all the handlers connected to the event. You can use the delegate''s
''Remove'' method to remove one delegate connected to the event after the
other.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>


这篇关于如何在活动中删除所有处理程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆