The command button in VB is a control called CommandButton. It can be found in the toolbox of the VB integrated programming window. When the user selects a button, not only does the action take place, but the button appears to be pressed and released.
The operating environment of this tutorial: Windows 7 system, Dell G3 computer, visual studio 2019 version.
The command button in VB is a control called CommandButton. It can be found in the toolbox of the VB integrated programming window.
Most Visual Basic applications have CommandButtons that allow users to perform actions by simply tapping the button. When the user selects a button, not only does the action take place, but the button appears to be pressed and released.
The Click event procedure is called whenever the user clicks the button. Write code into the Click event procedure to perform the desired action.
Extended information:
Notes
If the CommandButton is the default command button of the form, Even if the focus is moved to a control other than the CommandButton, pressing the Enter key will select the button. At design time, specify a button as the default CommandButton for a form by setting its Default property to True .
If the CommandButton is the default cancel button of the form, even if the focus is moved to other controls, the button can be selected by pressing the ESC key. At design time, specify a button as the form's default cancel button by setting its Cancel property to True.
All of these operations cause Visual Basic to call the Click event procedure.
For more computer-related knowledge, please visit the FAQ column!
The above is the detailed content of What is the command button control?. For more information, please follow other related articles on the PHP Chinese website!