Logo

Hacker’s Guide to Visual FoxPro
An irreverent look at how Visual FoxPro really works. Tells you the inside scoop on every command, function, property, event and method of Visual FoxPro.

SET PALETTE

SET PALETTE determines whether graphics are displayed using the native color palette from the first displayed graphic or from the Visual FoxPro palette.

Usage

SET PALETTE ON | OFF
lcPalette = SET("PALETTE")

Visual FoxPro has its own built-in palette for displaying graphics. This palette is optimized for displaying multiple graphics on the screen at one time. However, in order to do this, Visual FoxPro approximates the colors in each image using colors from its own palette. Consequently, each image may be displayed somewhat “off-color” from its true value—and surely an equal-opportunity company like Microsoft is going to avoid anything off-color in its PC software! SETting PALETTE ON may cause multiple images shown at the same time to appear quite differently from their expected colors.

If you need to display images at their highest resolution and with their true colors, plan to display only one on the screen at a time, with SET PALETTE OFF. If your application demands more than one image on the screen at once, you’ll need to accept the limitations of SET PALETTE ON.

SET(“PALETTE”), of course, tells you the current setting.

See Also

Image, OLEControl