Skip to content

Latest commit

 

History

History
29 lines (21 loc) · 1.34 KB

troubleshooting-inherited-event-handlers.md

File metadata and controls

29 lines (21 loc) · 1.34 KB
description title ms.date helpviewer_keywords ms.assetid
Learn more about: Troubleshooting Inherited Event Handlers in Visual Basic
Troubleshooting Inherited Event Handlers
07/20/2015
troubleshooting events [Visual Basic]
inherited events [Visual Basic]
troubleshooting Visual Basic, event handlers
event handling, troubleshooting
event handlers, troubleshooting
e1c8759f-5370-4308-8476-8c48b73509bf

Troubleshooting Inherited Event Handlers in Visual Basic

This topic lists common issues that arise with event handlers in inherited components.

Procedures

Code in Event Handler Executes Twice for Every Call

  • An inherited event handler must not include a Handles clause. The method in the base class is already associated with the event and will fire accordingly. Remove the Handles clause from the inherited method.

    [!code-vbVbVbalrEvents#32]

  • If the inherited method does not have a Handles keyword, verify that your code does not contain an extra AddHandler Statement or any additional methods that handle the same event.

See also