Responding to Events
Building a user interface using Windows Forms is all about responding to events (such as Click), so programming for Windows is commonly known as event-driven programming. To build a form, you paint controls onto a blank window called the Forms Designer using the mouse. Each of these controls is able to tell you when an event happens. For example, if you run your program and click a button that’s been painted onto a form, that button will say, “Hey, I’ve been clicked!” and give you an opportunity to execute some code that you provide to respond to that event. You have already been using this feature.
Chapter 6.1.1: Setting Up a Button Event
|