Microsoft KB Archive/129097

{| = Displaying Bitmaps Using CENTERED & ISOMETRIC keywords =
 * width="100%"|

ID: Q129097

2.60 2.60a 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.6 and 2.6a

SUMMARY
When displaying bitmaps to the screen by using @...SAY commands, you can use the CENTER keyword to center the .BMP file or OLE object within the area specified by the SIZE clause. You can use the ISOMETRIC keyword to scale a .BMP file or OLE object within the area specified by the SIZE clause.

The resulting behavior in version 3.0 is different from that in versions 2.x. In FoxPro versions 2.x, using both keywords causes the ISOMETRIC keyword to be ignored. In Visual FoxPro 3.0, both the CENTER and ISOMETRIC attributes are seen.

Behavior Demonstration in FoxPro Version 2.6
1. In the Command window, issue the following commands:

@1,1 to 20,20 && This will draw a box around the area as a reference

* The bitmap will be centered with the following @1,1 SAY '\fpw26\fox.bmp' BITMAP CENTER SIZE 20,20

* The bitmap will be enlarged to nearly the size of the box @1,1 SAY '\fpw26\fox.bmp' BITMAP ISOMETRIC SIZE 20,20 2. Clear the screen, and reissue the @1,1 to 20,20 command: * The bitmap will appear just above the CENTERed image but will not be  * scaled to fit in the 20,20 area @1,1 SAY '\fpw26\fox.bmp' BITMAP ISOMETRIC CENTER SIZE 20,20

Behavior Demonstration in Visual FoxPro Version 3.0
1. In the Command window, issue the following commands:

* This will draw a box around the area as a reference. * The box is not square but will provide a reference point. @1,1 to 20,20

* The bitmap will be normal size and centered in the box @1,1 SAY '\fpw26\fox.bmp' BITMAP CENTER SIZE 20,20

* The bitmap will enlarge to fit the horizontal measurements of the box @1,1 SAY '\fpw26\fox.bmp' BITMAP ISOMETRIC SIZE 20,20 2. Clear the screen, and reissue the @1,1 to 20,20 command: * The bitmap will appear centered within the horizontal measurements * and enlarged. @1,1 SAY '\fpw26\fox.bmp' BITMAP ISOMETRIC CENTER SIZE 20,20 Additional reference words: 2.60 2.60a 3.00 VFoxWin KBCategory: kbprg KBSubcategory: FxprgGeneral Keywords         : FxprgGeneral Version          : 2.60 2.60a 3.00 Platform         : WINDOWS
 * }