This control is used to begin, interrupt, or end a process. Choosing the CommandButton executes the command that has been written into its Click event procedure.
CommandButton
The CommandButton control supports the following properties:
The CommandButton control supports the following methods:
The CommandButton control supports the following events:
Click | LostFocus |
GotFocus | MouseDown |
KeyDown | MouseMove |
KeyPress | MouseUp |
KeyUp |
Set the CommandButton control's Caption property to display text on the button.
A user can choose a CommandButton by selecting it with a mouse device. To enable the user to choose a CommandButton by pressing ENTER, set the Default property to True. To enable the user to choose the button by pressing ESC, set the Cancel property of the CommandButton to True.