Responding to Windows Form Control Events

Displaying form controls and working with form control values are both important tasks, but neither addresses the issue of timing. When, for example, should your code process all the values on a form? When should your code check the values of each form field and beep, display a message, or otherwise inform the user that an entry is incorrect? When should your code and the user interact in any other way?

In most programs, the time to interact with the user depends on— surprise!—the user. The most obvious event occurs when the user clicks an OK button, but most controls raise dozens of events during the course of normal use. For example, each control on a form raises an event whenever the mouse passes over ...

Get Faster Smarter Beginning Programming now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.