Combining Controls

Before Visual Basic .NET, the only type of control you could create in VB was a user control. When you created a new control, you ended up with an empty “design surface” just like a form. You placed controls (buttons, text boxes, and so on) onto that surface and the combined result could be used like a single control on other forms. An example is shown in Figure 8.2.

This form of control works well for some things, like combining a text box with a label for ease of arrangement, but it is difficult to use when all you want to do is wrap an existing control. The chapter already covered the concept of extending an existing control in the section entitled “Extending Through Inheritance,” but user controls still exist in Visual ...

Get Microsoft® Visual Basic® .NET 2003 Kick Start 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.