Creating a Windows Control

Assembling a new custom control from existing controls provides many advantages. First, when you add an existing control from the Toolbox to your new custom control, you get the existing control’s complete functionality—an important consideration when you think about how many event handlers, methods, and properties are supported by an average control. Second, combining a number of controls into one allows them to be treated as a single unit, which may make things easier from an application architecture standpoint; this approach also allows them to be drawn on the form all at once. An additional advantage is that your users can easily understand a new control made up of controls they already know.

One way to create ...

Get Special Edition Using Microsoft® Visual Basic® .NET 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.