Hi:
I have a control on a WinForm that has a KeyDown handler assigned, but in a
different part of the program, where I don't have the actual handler that
was added (+=), I wish to empty the KeyDown handler. As I don't have the
actual handler to use with -=, how do I do this?
TIA,
Martin.
Dmitriy Lapshin [C# / .NET MVP] - 17 Dec 2004 13:02 GMT
Create a delegate instance pointing to the same event handling routine the
delegate used with += points to and use it with -=.
Still, I'd recommend to keep event handler management in the same part of
the program.

Signature
Sincerely,
Dmitriy Lapshin [C# / .NET MVP]
Bring the power of unit testing to the VS .NET IDE today!
http://www.x-unity.net/teststudio.aspx
> Hi:
>
[quoted text clipped - 5 lines]
> TIA,
> Martin.