O'Reilly logo

Visual Basic® .NET by Example by Bob Donald, Gabriel Oancea

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

Events are an important part of the Windows Forms programming model. They are used to communicate particular actions or “events” that occur during an application lifecycle. The most common example of an event is a button click. When a user clicks a button on a form an event is fired. Events can be caught (or listened to), and as a result you can specify code that is run only when a particular event occurs. The procedures that receive events are called event handlers.

The next set of examples illustrate the Event mechanism in .NET and how you can use it to develop an event-driven user interface in Windows Forms. In Windows Forms, forms and controls have a set of predefined events that can be fired and caught in your code. In the next chapter, ...

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