Home  >  Article  >  What is the command button control?

What is the command button control?

醉折花枝作酒筹
醉折花枝作酒筹Original
2021-07-02 11:20:353661browse

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.

What is the command button control?

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.

What is the command button control?

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!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn