Control Base Classes

The Windows Forms library, like custom controls, uses various base classes for both controls and designers. Often it's helpful to have a point of reference in order to proceed with a new project. A hierarchy of the class structure provides an excellent reference advantage. Figure 5.1 shows the class hierarchy starting with the System.Windows.Forms.Control class.

Figure 5.1. The control class hierarchy.

Regardless of the control you intend to build, there exists a base class from which to begin. Notice that a Form is in fact derived from a control base class, the ContainerControl class to be precise. Each level in the hierarchy ...

Get .NET Windows® Forms Custom Controls 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.