Share via


Classes Used in .NET Framework Forms

The following tables list the classes commonly used for .NET Framework Windows Forms applications, categorized into the base classes, control classes, component classes, and dialog box classes.

To enter the .NET Framework documentation and find a more comprehensive listing, see the System.Windows.Forms namespace.

The Base Classes

The following table lists and describes the main Windows Forms classes in the System.Windows.Forms namespace.

Class

Description

Control

Defines the base class for controls, which are components with visual representation. Provides the base functionality for all controls that are displayed on a Form.

Form

Represents a normal window, modeless window, dialog box, Multiple Document Interface (MDI) client, or MDI parent window. Forms make up an application's user interface.

UserControl

Provides an empty control that can be used to create other controls or create a custom control that is a composite of other controls.

Control Classes

The following table lists and describes a sampling of the System.Windows.Forms namespace's control classes. You can use these controls to create rich user interfaces.

Class

Description

TextBox

Data-entry control. Represents a Windows text-box control.

ComboBox

Data-entry control. Represents a Windows combo-box control.

Label

Data-display control. Represents a standard Windows label.

ListView

Data-display control. Represents a Windows list-view control, which displays a collection of items that can be displayed using one of four different views.

Button

Command-button control. Represents a Windows button control.

ToolStrip

Command-button control. Provides a container for Windows toolbar objects.

PropertyGrid

Designer control. Provides a user interface for browsing the properties of an object.

Component Classes

In addition to controls, the System.Windows.Forms namespace provides other classes that do not derive from the Control class but still provide visual features to a Windows-based application. The following table shows some of the available component classes.

Class

Description

ToolTip

Data-display component. Represents a small rectangular pop-up window that displays a brief description of a control's purpose when the user rests the pointer on the control.

ErrorProvider

Data-display component. Provides a user interface for indicating that a control on a form has an error associated with it.

ToolStripDropDownMenu

Menu component. Provides basic functionality for the ContextMenuStrip control.

ContextMenuStrip

Menu component. Represents a shortcut menu.

Help

Help component. Encapsulates the HTML Help 1.0 engine.

HelpProvider

Help component. Provides pop-up or online Help for controls.

Dialog Box Classes

Windows provides a number of common dialog boxes that you can use to give your application a consistent user interface when performing tasks such as opening and saving files, manipulating the font or text color, or printing. The following table lists some of the commonly used classes used for reading from and writing to files with streams.

Class

Description

OpenFileDialog

Provides the functionality to display a dialog box that enables the user to browse to and enter the name of a file to open or save.

SaveFileDialog

Provides the functionality to display a dialog box that enables the user to browse to and enter the name of a file to open or save.

FontDialog

Displays a dialog box to change elements of the font used by your application

PageSetupDialog

Displays a dialog box that enables the user to control aspects of printing documents.

PrintDialog

Displays a dialog box that enables the user to control aspects of printing documents.

MessageBox

Displays a message box that can display and retrieve data from the user.

See Also

Concepts

Windows Forms Application Concepts in Visual Basic

Windows Forms Application Basics

Overview of Windows-based Applications

Reference

Windows Forms Overview

System.Windows.Forms

System.Drawing.Printing