VB.NET 1.1 Tutorial - The Handles KeywordThe Handles keyword is used to declare that a procedure handles a specified event. The name of the event being handled is referenced after the keyword. This event must be raised by either the base class for the current class, or by an object declared using the WithEvents keyword. The Handles statement must either specify an object variable that was declared with the WithEvents keyword, or a member qualified with the MyBase keyword. For example to implement the OnPaint event, the following code would be used. Handles MyBase.Paint ReferencesFor more information on the Handles keyword, visit MSDN at microsoft here. What Next?Return to the Tutorial Contents. |