Appendix B. Control Summary

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

BackgroundWorker

Executes a background task on a separate thread. Events provide notification of progress and completion (System.ComponentModel namespace).

Button

A button.

CheckBox

A checkbox.

CheckedListBox

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 ListBox control.

ColorDialog

A dialog that lets the user select a color.

ComboBox

A combo box.

ContextMenuStrip

A context menu. Assign this object to another control's ContextMenu property and the menu automatically appears when the user right-clicks the control.

DataGridView

Displays a grid of data, possibly bound to a data source.

DateTimePicker

Allows the user to select a date and a time.

DomainUpDown

Displays a spin box (up-down control) that lets the user scroll ...

Get Stephens' Visual Basic® Programming 24-Hour Trainer now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.