O'Reilly logo

Microsoft® .NET Compact Framework (Core Reference) by Mark Sutton, Rory MacLoed, Robert Burbidge, Stephen Wheelwright, Andy Wigley

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Inheriting from the Control Class

Inheriting from an existing control is a useful technique if the control you want to build can be described and implemented conveniently using the inheritance relationship "is a." In the previous sample, a text box with numeric-only input "is a" special kind of text box. This is not always the case, especially if the custom control is not closely related to any existing controls or if the custom control is a collection of existing controls.

If the new control is not related to an existing control, you must inherit from a more generic class. The .NET Compact Framework allows the developer to inherit from the Windows.System.Forms.Control class. Figure 18-1 shows a portion of the .NET Framework class hierarchy in ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required