Keyword

# RemoveHandler

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

## Description

Removes an event handler that was added by `AddHandler</api/language/addhandler>`. You need to match the AddHandler call.

## Usage

``` xojo
RemoveHandler eventName, delegateMethod 
```

| Part           | Description                        |
|----------------|------------------------------------|
| eventName      | The event is handled by a method.  |
| delegateMethod | The method that handles the event. |

## Notes

Always remove any handlers added with `AddHandler</api/language/addhandler>` when you are finished with them.

## Sample code

This example removes the work of the `AddHandler</api/language/addhandler>` example. Please see that example for a description of how it works.

``` xojo
RemoveHandler MyTimer.Action, AddressOf MyTimeOut
```

## Compatibility

|                       |     |
|-----------------------|-----|
| **Project Types**     | All |
| **Operating Systems** | All |

<div id="removehandler.see_also">

<div class="seealso">

`AddHandler</api/language/addhandler>`, `AddressOf</api/language/addressof>` statements.

</div>

</div>
