CommandButton Control

Description

Starts, ends, or interrupts an action or series of actions.

Remarks

The macro or event procedure assigned to the CommandButton's Click event determines what the CommandButton does. For example, you can create a CommandButton that opens another form. You can also display text, a picture, or both on a CommandButton.

The default property of a CommandButton is the Value property.

The default event for a CommandButton is the Click event.

Properties

Accelerator property, AutoSize property, BackColor property, BackStyle property, BoundValue property, Cancel property, Caption property, ControlTipText property, Default property, Enabled property, Font object, ForeColor property, Height, Width properties, HelpContextID property, LayoutEffect property, Left, Top properties, Locked property, MouseIcon property, MousePointer property, Name property, Object property, OldHeight, OldWidth properties, OldLeft, OldTop properties, Parent property, Picture property, PicturePosition property, TabIndex property, TabStop property, Tag property, TakeFocusOnClick property, Value property, Visible property, WordWrap property.

Methods

Move method, SetFocus method, ZOrder method.

Events

BeforeDragOver event, BeforeDropOrPaste event, Click event, DblClick event, Enter, Exit events, Error event, KeyDown, KeyUp events, KeyPress event, MouseDown, MouseUp events, MouseMove event.

Example

See the Accelerator property example.

Example

See the ControlTipText property example.