O'Reilly logo

Developing and Implementing Windows®-Based Applications with Visual C#™ .NET and Visual Studio® .NET Exam Cram™ 2 (Exam 70-316) by Priti Kalani, Amit Kalani, Kalani Kirk Hausman

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Event Handling

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

Attaching a Delegate

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required