This appendix describes the standard controls and components provided by Visual Basic .NET. Some of these are quite complicated, providing dozens or even hundreds of properties, methods, and events, so it would be impractical to describe them all completely here. Besides, the online help does a better job of explaining all of the controls’ properties, methods, and events than a book can, covering all of the overloaded versions of the methods and providing hyperlinks to related topics.
The sections in this appendix describe the components’ general purposes and give examples of what I believe to be their simplest, most common, and most useful usages. The idea is to help you decide which components to use for which purposes, and to give you some idea about the components’ most commonly used properties, methods, and events. To learn more about a particular component, see the online help.
Tip | You can find information about most of these controls under the “System.Windows.Forms Namespace” topic in the MSDN help at msdn2.microsoft.com/library/system.windows .forms.aspx. Use the navigation tree in the left pane to find the controls you want to study. |
Note that all of these components inherit from the Component class, and the controls inherit from the Control class. Except where overridden, the components and controls inherit the properties, methods, and events defined by the Component and Control classes. Chapter 2 discusses some of the more useful properties, methods, and events provided by the Control class, and many of those apply to these controls as well.
Figure G-1 shows the Visual Basic toolbox displaying the standard Windows forms controls.
Figure G-1: Visual Basic provides a large number of standard components and controls for Windows forms.
The following table lists the components shown in Figure G-1 in the same order in which they appear in the figure.
Pointer | BackgroundWorker | BindingNavigator | BindingSource |
Button | CheckBox | CheckedListBox | ColorDialog |
ComboBox | ContextMenuStrip | DataGridView | DataSet |
DateTimePicker | DirectoryEntry | DirectorySearcher | DomainUpDown |
ErrorProvider | EventLog | FileSystemWatcher | FlowLayoutPanel |
FolderBrowserDialog | FontDialog | GroupBox | HelpProvider |
HScrollBar | ImageList | Label | LinkLabel |
ListBox | ListView | MaskedTextBox | MenuStrip |
MessageQueue | MonthCalendar | NotifyIcon | NumericUpDown |
OpenFileDialog | PageSetupDialog | Panel | PerformanceCounter |
PictureBox | PrintDialog | PrintDocument | PrintPreviewControl |
PrintPreviewDialog | Process | ProgressBar | PropertyGrid |
RadioButton | ReportViewer | RichTextBox | SaveFileDialog |
SerialPort | ServiceController | SplitContainer | Splitter |
StatusStrip | TabControl | TableLayoutPanel | TextBox |
Timer | ToolStrip | ToolStripContainer | ToolTip |
TrackBar | TreeView | VScrollBar | WebBrowser |