Button Overview

Measurement Studio User Interface

Visual Basic Reference Click the Hide/Show button in the toolbar to hide or show the Visual Basic table of contents.

Button Overview

Represents different types of Boolean controls on a user interface. A Boolean control displays an on or off state (True or False). Buttons are often used to input or output Boolean information or initiate an action in your program.

  • Different display styles: toggle switches, LEDs, push buttons, slides, and on/off buttons.
  • Custom bitmap buttons.
  • Button modes specify how the Button control responds to user input. For example, you can make a button respond only programmatically (that is, not respond to any user input). Or you can click the button to temporarily change its value and then release to revert the button to its original state (called a latch). Finally, you can click on the button to change its value until you click on it again.
  • Built-in format styles for the labels, including scientific, symbolic engineering, scaling, time, and date.
  • Animation - you can animate different parts of the control. For example, you might want to animate the text on a stop button.
  • Custom background images.
  • Three-dimensional button style.


  • As you are working in the Images property page, you are setting properties for the button in the state (On or Off) that it appears in the preview window. If the button is off in the preview window, then you are setting the caption, off text, on text, and image properties for when the button is off. If the button is on in the preview window, then you are setting the caption, off text, on text, and image properties for when the button is on. For example, click the button on in the preview window and load the bitmap for the button's On state. Click the button off in the preview window to load the bitmap for the Off state. It doesn't matter what state the button is in when you are setting the background image. The background image is either visible or invisible for both the On and Off state.


  • To get information about any of the properties in the button control's property pages, right click on the property and select What's This?. For complete reference information about this control and its properties, click on the Visual Basic or Visual C++ Reference link.
  • In Visual C++, if you select the ALL tab in the property pages, the What's This? help is disabled.