How the Color of Screen and GET Objects Is ConvertedID: Q132051 The information in this article applies to:
SUMMARYUsing FoxPro version 2.x for Windows, you can control the color of screens by using the Screen Layout dialog box, and you can control the color of GET objects interactively from the Object menu. This article describes how user-defined colors set in the Screen Builder are converted when a FoxPro version 2.x screen is ported to a Visual FoxPro version 3.0 form.
MORE INFORMATIONIn FoxPro version 2.x for MS-DOS, you can change the color of GET objects by choosing Color from the Screen menu. The dialog box allows you to control the color schemes used with GET fields and the color pairs used with SAY fields. On the other hand, the screen interface for FoxPro for Windows and FoxPro for Macintosh version 2.x allows the manipulation of color pairs, as opposed to color scheme, for each GET object. The Converter is a tool that allows you to transport your version 2.x projects, screens, and reports to Visual FoxPro projects, forms, and reports. A converted form emulates a READ and this implementation uses form sets, forms, and page frames. You can either perform a visual or a functional conversion. This article explores functional conversion only. For more information about converting your application, search for "Converting" in the Visual FoxPro Help menu.
Color Properties Exposed in a Visual FoxPro FormVisual FoxPro exposes several properties to customize the colors of controls and forms. The BackColor, ForeColor, DisabledBackColor, and DisabledForeColor properties specify the background and foreground colors used to display text and graphics. They correspond to the concept of color pairs (background and foreground). For a list of controls that use these properties, search for "ForeColor" or any other property in the Visual FoxPro Help menu. The ColorSource property determines how a control's colors are set. When it is set to 2, the ColorScheme property specifies the color scheme used with the control. These properties are used by a converted form.
Conversion of Form ColorsFoxPro for MS-DOS does not provide an interactive way to control the background color of the screen. In FoxPro version 2.x for Windows and FoxPro for Macintosh, if you modify the background color of a window, the BACKCOLOR and FILLCOLOR properties of the new form are set to the colors you specify. If you did not alter the color of the screen, the Visual FoxPro form uses the Windows Background color set in the Control Panel.
Conversion Control ColorsThe color of GET objects created in a FoxPro for Windows or FoxPro for Macintosh screen is converted as follows:
The Converter does not convert the color of GET objects from screens that were created in FoxPro for MS-DOS. To edit the color of the converted objects, modify the BackColor and ForeColor properties. If you prefer to use color schemes, you can set the ColorSource property to 2-ColorSchemePropertyScheme, and then set the ColorScheme property to the user-defined schemes. Use the following syntax to define color schemes:
Conversion of READ COLOR ClauseThe READ COLOR clause is not converted from a version 2.x screen to a Visual FoxPro form. To obtain the effect provided by a READ COLOR, you can set the ForeColor and BackColor properties of the active control in the GotFocus event handler, and change it back in the LostFocus event handler. Additional reference words: 3.00 VFoxWin KBCategory: kbtool KBSubcategory: FxtoolConverter |
Last Reviewed: July 28, 1995 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |