Creating Event Handlers in the Designer

You can create event handlers in the Designer by using the Properties window. By pressing the "lightning bolt" button in the Properties window (shown in Figure 4-6),

Figure 4-6 The Events button in the Properties window

The Properties window displays the events that can be raised by the control, as shown in Figure 4-7.

Properties

a

But ton 1 System .Windows, Forms. Button

:::HuB i

El (DataBindings)

Ü

AutoSizeChanged

BackColorChanged

BackgroundlmageChanged

BackgroundlmageLayoutChang

BindingContextChanged

H

CausesValidationChanged

ChangeUICues

Click

ClientSizeChanged

ContextMenu5tripChanged

ControlAdded

ControlRemoved

CursorChanged

DockChanged

DragDrop

DragEnter

DragLeave

v

Click

Occurs when the component is clicked.

- Properties -'^Solution Explorer

Figure 4-7 The Properties window configured to display events

Was this article helpful?

0 0

Post a comment