How to Set Object's BackColor to Button Face's BackColorID: Q131081 3.00 WINDOWS The information in this article applies to:
SUMMARYThis article shows by example how to set the BackColor of an object to the current button-face color. You can use this in a program to change the BackColor of the form or form page color to match that of the button face or 3D color.
MORE INFORMATION
Step-by-Step Example Using CodeThe following program displays a form that contains one command button (Button1). The code in the Click procedure sets the BackColor of the form to the current BackColor of the button face. 1. From the File menu, choose New. Select the Program option, and choose 2. Enter the following code:
3. Save the Program, and run it. When the form displays, click an area of
Step-by-Step Example Using the Form DesignerTo add this functionality to a Form by using the Visual FoxPro Form Designer, follow these steps: 1. Add a command button to the form by using the Form Control Toolbar. 2. Using the secondary (right) mouse button, click the new command button 3. Select the Layout tab in the Properties dialog box. Change the Caption
4. Select the Methods tab in the Properties dialog box, and double-click
5. Using the primary (left) mouse button, double-click the Form to open the
6. Select Click from the Procedure list, and add the following code to this
7. Save the Form, and run it.
Additional reference words: 3.00 VFoxWin KBCategory: KBSubcategory: FxtoolFormdes
|
Last Reviewed: May 22, 1998 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |