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

Creating a Design-Time Custom Control

In all the examples presented so far in this chapter, you’ve had to instantiate objects of the custom control or component classes by explicit programming. This technique works, as you’ve seen, but it is not as convenient as dragging, say, a list box from the toolbox onto your form. This section explains how to integrate your custom controls with the Forms Designer so that you can place your custom controls in the toolbox and have all the convenience that entails.

Dragging one of the built-in controls onto a form design surface makes Forms Designer perform the following actions:

  • Pick a name for the instance of the control (for example, listBox1).

  • Create a private reference variable of the appropriate type inside ...

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