Microsoft KB Archive/106702

From BetaArchive Wiki

How to Change Color of Push Buttons in FoxPro for Windows

ID: Q106702

2.5x 2.6x 3.00 WINDOWS kbprg

The information in this article applies to:

  • Microsoft Visual FoxPro for Windows, version 3.0
  • Microsoft FoxPro for Windows, versions 2.5x, 2.6x

SUMMARY

In Visual FoxPro, the color of the text on a button is controlled by the ForeColor property of a Command Button.

In FoxPro 2.x, the color of a "normal" push button containing only text cannot be changed in Microsoft FoxPro for Windows. However, you can place a bitmap picture containing just text on the face of a "picture" push button; the text and background of the bitmap can be any color.

MORE INFORMATION

NOTE: The following only applies to FoxPro 2.x for Windows.

The FoxPro for Windows Screen Builder allows the creation of three types of push buttons: Normal, Invisible, and Picture. A Normal type push button takes on the color scheme used by the push buttons in all Windows-based applications (as defined in the Windows Control Panel) because, according to the common user interface standard, Windows-based applications should "look and feel" the same regardless of the application.

To use a push button in FoxPro that is a color other than the Windows default, do the following:

1. Use Paintbrush or some other graphics program to create a .BMP file

   containing the text that will appear on the button.

2. In FoxPro, create a new screen. 3. Click the Push Button tool in the toolbox.

4. Select Picture as the button type.

5. Select the .BMP file that you created in step 1, and then choose Open.

6. Assign a variable to the push button, and then choose OK.

REFERENCE

FoxPro for Windows, "User's Guide," version 2.5, pages U11-23 to U11-51

Additional reference words: FoxWin VFoxWin 2.50 2.50a 2.50b 3.00 CommandButton KBCategory: kbprg KBSubcategory: FxtoolSbuilder

Keywords          : FxtoolSbuilder 
Version           : 2.5x 2.6x 3.00
Platform          : WINDOWS

Last Reviewed: April 30, 1996
© 1999 Microsoft Corporation. All rights reserved. Terms of Use.