O'Reilly logo

Windows Forms Programming in C# by Chris Sells

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

Custom Controls

Owner-draw controls allow a great deal of control over how a control draws itself, but to take full command of how a control acts you must build a custom control. There are three main kinds of custom controls:

  • Controls that derive directly from the Control base class, allowing you to handle your control's input and output completely

  • Controls that derive from ScrollingControl, which are like controls that derive from Control but also provide built-in support for scrolling

  • Controls that derive from an existing control to extend their behavior

The kind of control you choose depends on the kind of functionality you need. If you need something that's fundamentally new, you'll derive from Control or ScrollingControl, depending on whether ...

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