This appendix summarizes the purposes of the most common Windows Forms controls. The intent of this appendix is to let you know what kinds of controls are available, not to provide an exhaustive reference.
For additional details on how to use a control, see the online documentation. The web page describing a control is named after the control, including its namespace. For example, the web page describing the ComboBox
class is msdn.microsoft.com/library/system.windows.forms.combobox.aspx
.
Unless otherwise noted, all the controls listed here are in the System.Windows.Forms
namespace (which you need to know to enter the correct URL).
CONTROL | PURPOSE |
---|---|
| Executes a background task on a separate thread. Events provide notification of progress and completion ( |
| A button. |
| A checkbox. |
| A list of items with checkboxes that let the user easily select one or more items without needing the Click/[Shift]+Click/[Ctrl]+Click techniques used by the regular |
| A dialog that lets the user select a color. |
| A combo box. |
| A context menu. Assign this object to another control's |
| Displays a grid of data, possibly bound to a data source. |
| Allows the user to select a date and a time. |
| Displays a spin box (up-down control) that lets the user scroll through a list of predefined options. |
| Displays an error indicator for other controls. |
| Allows a program to interact with system event logs ( |
| Raises events when a directory or file changes so you can keep track of it (although I've had mixed success with this control) ( |
| A panel that dynamically arranges its contents in either rows or columns. |
| A dialog that lets the user select a folder (directory). |
| A dialog that lets the user select a font. |
| Displays a window on the desktop. |
| Groups controls inside an outline and displays a header for the group. |
| Provides a tooltip or online help for other controls. |
| A horizontal scrollbar. |
| Stores a list of images for use by other controls. |
| Displays non-editable text in a single font. |
| Displays a label that contains a hyperlink. When the user clicks the hyperlink, the control raises an event so the program can take action. |
| Displays a list of items. |
| Displays a group of items in one of four different views: |
| Similar to a |
| A form's main menu. |
| Provides tools for creating and interacting with message queues ( |
| Allows the user to select a date or date range from a calendar. |
| Displays an icon in the notification area or system tray (usually on the right end of the taskbar). Can provide a context menu, and the program can use the icon to indicate status to the user. |
| Displays a spin box (up-down control) that lets the user pick a numeric value. |
| A dialog that lets the user select a file for opening. Can require that the file actually exists. |
| A dialog that allows the user to define printer page settings, such as margins and printout orientation. |
| A simple container that holds other controls. Set |
| Provides access to Windows NT performance counters ( |
| Displays an image. The |
| A dialog that allows the user to select a printer, set printer properties, and pick the pages to print. |
| Represents a printed document. Catch the |
| Displays a preview of a |
| Displays a preview of a |
| Lets a program control processes running on the system. You can use the |
| Indicates the progress of some task to the user. |
| Displays an object's properties at run time and lets the user edit them, much like the Properties window lets you change a control's properties at design time. |
| A radio button. |
| Lets the user edit text. Can display multiple fonts, images, bulleted and numbered lists, and other formats. |
| A dialog that lets the user select a file for saving. Can prompt the user to overwrite the file if it already exists. |
| Allows a program to control serial ports ( |
| Allows a program to control Windows services ( |
| Displays two |
| A status bar, usually displayed at the bottom of a form. |
| |
| A panel that arranges its contents in rows and columns. |
| Lets the user edit text in a single font. |
| A component that raises a |
| A toolbar. |
| A container that can hold |
| Displays a tooltip for other controls when the mouse hovers over them. |
| Displays a trackbar that lets the user select a numeric value. It behaves much like a scrollbar does but with a different appearance. |
| Displays a hierarchical set of items, much like the left panel in Windows Explorer normally does (if you haven't customized its appearance). |
| A vertical scrollbar. |
| A web browser control. You can use this to control a browser inside your application. For example, your program can go to specific sites, examine URLs and cancel navigation for some URLs, examine the links and images on a web page, and so on. |