O'Reilly logo

Start Here!™ Fundamentals of Microsoft® .NET Programming by Rod Stephens

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

Events

A program uses properties to determine a control’s appearance and behavior and uses methods to make it perform some action. A third way that a program can interact with a control is by using events. An event is a mechanism that lets a control tell the program that something interesting has occurred.

When something interesting occurs, a control raises the event. The program can catch or handle the event and take whatever action is appropriate. It might display new output to the user, start performing some task, or close the application. The code that processes the event is called an event handler.

Probably the most common event is the Click event, which is raised by buttons and menu items when the user clicks them. For example, when the user ...

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