Developing Custom Windows Forms Controls with the .NET Framework

Windows Forms controls are reusable components that encapsulate user interface functionality and are used in client-side Windows-based applications. Not only does Windows Forms provide many ready-to-use controls, it also provides the infrastructure for developing your own controls. You can combine existing controls, extend existing controls, or author your own custom controls. This section provides background information and samples to help you develop Windows Forms controls.

Caution

This content was written for .NET Framework. If you're using .NET 6 or a later version, use this content with caution. The designer system has changed for Windows Forms and it's important that you review the Designer changes since .NET Framework article.

In This Section

Overview of Using Controls in Windows Forms
Highlights the essential elements of using controls in Windows Forms applications.

Varieties of Custom Controls
Describes the different kinds of custom controls you can author with the System.Windows.Forms namespace.

Windows Forms Control Development Basics
Discusses the first steps in developing a Windows Forms control.

Properties in Windows Forms Controls
Shows how to add to properties to Windows Forms controls.

Events in Windows Forms Controls
Shows how to handle and define events in Windows Forms controls.

Attributes in Windows Forms Controls
Describes the attributes you can apply to properties or other members of your custom controls and components.

Custom Control Painting and Rendering
Shows how to customize the appearance of your controls.

Layout in Windows Forms Controls
Shows how to create sophisticated layouts for your controls and forms.

Multithreading in Windows Forms Controls
Shows how to implement multithreaded controls.

Reference

System.Windows.Forms.Control
Describes this class and has links to all of its members.

System.Windows.Forms.UserControl
Describes this class and has links to all of its members.

Design-Time Attributes for Components
Lists metadata attributes to apply to components and controls so that they are displayed correctly at design time in visual designers.

Extending Design-Time Support
Describes how to implement classes such as editors and designers that provide design-time support.

How to: License Components and Controls
Describes how to implement licensing in your control or component.

Also see Developing Windows Forms Controls at Design Time.