Displaying Bitmaps Using CENTERED & ISOMETRIC keywords

Last reviewed: April 30, 1996
Article ID: Q129097
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.

MORE INFORMATION

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


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

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