O'Reilly logo

VB.NET Language in a Nutshell, Second Edition by Steven Roman PhD, Paul Lomax, Ron Petrusha

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Name

RemoveHandler Statement

Syntax

RemoveHandler NameOfEventSender, AddressOf NameOfEventHandler
NameOfEventSender (required; String literal)

The name of a class or object instance and its event, such as Button1.Click

NameOfEventHandler (required; String literal)

The name of a subroutine to remove as event handler for NameOfEventSender

Description

Removes a previous binding of an event handler to a built-in or custom event

Example

For an illustration, see Section 7.2.3 in Chapter 7.

Programming Tips and Gotchas

The Handles keyword can be used to receive event notification for the lifetime of an object. In contrast, AddHandler and RemoveHandler can be used to dynamically add and remove event notification at runtime.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required