Export (0) Print
Expand All

How to: Create Event Handlers in the Visual Basic Code Editor

The Visual Basic Code Editor provides an easy way to create event handlers for your Windows Forms. Although it does not allow you to connect multiple events to a single event handler (see How to: Connect Multiple Events to a Single Event Handler in Windows Forms), it does provide a quick and easy way to create event handlers while working on your form's code without having to display the form in the Windows Forms Designer.

To create an event handler using the Visual Basic Code Editor

  1. In the Code Editor, from the Class Name drop-down list, choose the form or control that you want to create an event handler for.

  2. From the Method Name list at the top of the Code Editor, choose the event that you want to create an event handler for.

    Visual Basic creates an event handler and adds it to your form's class.

Community Additions

ADD
Show:
© 2014 Microsoft