Visual Basic provides a large assortment of controls that you can use on your forms. When they don’t do exactly what you need, you can build others.
If an existing control does most of what you need, derive a new control from that one. If a group of controls together with their properties, methods, and events can do what you need, combine them into a composite control that inherits from the UserControl object. If you want to build a new control from scratch, make a class that inherits from the Control class. Finally, if you want an object that is available at design time but invisible at runtime, build a component.
When you build a control or component, you can use attributes to give extra information to Visual Studio. The ToolboxBitmap, DefaultProperty, DefaultEvent, DesignTimeVisible, Description, Category, Browsable, and DefaultValue attributes are some of the more useful ones for control and component classes.
Visual Basic provides many other features that you can use to build other kinds of control-related classes and their properties. An extender provider class adds new properties to the other controls on a form much as the ErrorProvider and ToolTip controls do. A type converter (which translates data from one type to another) can translate between values and text for display in the Properties window, and can generate a customized list of choices for a property drop-down list. A UI type editor enables you to build a graphical editor that the developer can use to view and manipulate special property values. These are more advanced topics that lie beyond the scope of this book.
Visual Basic also provides tools for designer localization, control licensing, multithreading, control containers, and much more. Most of the time, however, you can do what you want using standard controls, derived controls, composed controls, controls built from scratch, and components. If you really must offer more exotic features (such as fancy editors and wizards), read the online help or search Visual Basic discussion groups on the Web.
Chapters 9 through 12 deal with different kinds of controls. Chapter 13 moves away from the topic of controls and explains how an application can support drag-and-drop applications. Using the clipboard is similar to certain types of drag-and-drop operations, so Chapter 13 also explains how to use the clipboard.