View contents of this chapter

The Command Button Control

Almost every application's form contains a command button. You can use a Command Button control to begin, interrupt, or end a process. When a user clicks a command button, it appears pushed in.

Some useful command button properties are listed below:

  • Cancel: This property determines how the command button responds to the Esc key. If this property is True, the user can simulate a click by pressing the Esc key.
  • Caption: This property specifies the text that appears on the command button.
  • Default: This property determines how the command button responds to the Enter Key.

Play Sound Only one command button on a form can be the default command button.

  • Picture: This property specifies a graphic image that appears on the command button in place of a caption.

Play Sound For Picture property to work, you must set the Style property to 1- Graphical.

Play Sound You can add an accelerator key to a command button so that the user can select the command button by pressing the appropriate key combination.

Play Sound An accelerator key is a key that, when combined with the Alt key, triggers a response.


© Universal Teacher Publications        INDEX Previous Screen Next Screen