Description

Adds a control to the collection and returns a reference to the control.

Syntax:

object.Add(type)

Parameters

type
Required. A string that identifies the type of control to add. Can be one of the following values:
Type Description
"Button" The Button control
"CheckBox" The CheckBox control.
"ComboBox" The CheckBox control.
"GroupBox" The GroupBox control.
"HyperLink" The HyperLink control.
"Label" The Label control.
"ListBox" The ListBox control.
"ListView" The ListView control.
"Panel" The Panel control.
"PictureBox" The PictureBox control.
"ProgressBar" The ProgressBar control.
"RadioButton" The RadioButton control.
"RichTextBox" The RichTextBox control.
"SplitContainer" The SplitContainer control.
"Splitter" The Splitter control.
"StatusBar" The StatusBar control.
"TabControl" The TabControl control.
"TextBox" The TextBox control.
"ToolButton" The ToolButton control.
"TrackBar" The TrackBar control.
"TreeView" The TreeView control.

Example

$Button1 = $Form.Controls.Add("Button")

Applies To

ControlCollection


The CHM file was converted to HTML by chm2web software.