CONTROLS AND COMPONENTS
Controls are graphic by nature. Buttons, text boxes, and labels provide graphical input and feedback for the user. They display data and let the user trigger program actions. Some controls (such as grid controls, tree view controls, and calendar controls) are quite powerful and provide a rich variety of tools for interacting with the user.
In contrast, components are represented by graphical icons at design time and are hidden at run time. They may display some other object (such as a dialog box, menu, or graphical indicator), but the component itself is hidden from the user.
Many components display information to the user. Others provide information needed by graphical controls. For example, a program can use connection, data adapter, and data set components to define data that should be selected from a database. Then a Grid control can display the data to the user. Because the connection, data adapter, and data set objects are components, you can define their properties at design time without writing code.
Figure 8-1 shows a form at design time that contains several components. The components appear in the component tray at the bottom of the form, not on the form’s graphical surface.
FIGURE 8-1: At design time components appear in the component tray below a form.
This example contains four components. Timer1 fires an event periodically so the program ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access