Event handling is the process of reacting to events and is an important part of programming a user interface. An event is generated as the result of user actions, such as resizing a form, clicking the form, or moving the mouse over the form. An event also can be generated by changes in the environment, such as when a change in time occurs or when another application performs some action that affects the current application.
Two basic methods of event handling exist:
Attaching a delegate
Overriding a protected method of the base class
When a form is loaded, a Load event is raised. When you click the left or right buttons of a mouse, a MouseDown event is raised. Therefore, events enable a class to provide notifications ...