Changing Font Used in Print Commands in FP for Windows

Last reviewed: April 29, 1996
Article ID: Q99621
The information in this article applies to:
  • Microsoft Visual FoxPro for Windows, version 3.0
  • Microsoft FoxPro for Windows, versions 2.5x, 2.6x

SUMMARY

Commands such as LIST TO PRINTER, DISPLAY STRUCTURE TO PRINTER, and TYPE TO PRINTER do not include a method for changing the font in FoxPro for Windows. These commands use the FoxPrint font by default.

A new command called SET PRINT FONT was added to FoxPro for Windows to allow you to specify a font other than the default FoxPrint font for all printed output and textmerge output. This command was added after the documentation had already been printed, so it is not included in the documentation.

MORE INFORMATION

In FoxPro for Windows, the following command will change the font:

   SET PRINT FONT "font name",point size

This command allows the font's name and size to be changed in subsequent commands such as LIST TO PRINTER or DISPLAY STRUCTURE TO PRINTER.

For example, enter the following code in the Command window:

   USE file1.dbf
   LIST STRUCTURE TO PRINTER  && Structure prints using FoxPrint font.

   SET PRINT FONT "Arial",12
   LIST STRUCTURE TO PRINTER  && Structure prints using Arial font
                              &&  with size 12.

Under FoxPro for Windows versions 2.x, the following commands will not generate an error, but neither will it use the STYLE clause:

   SET PRINT FONT "Arial", 12 STYLE 'B'

The SET PRINT FONT command uses only the font name and point size as arguments.

Under Visual FoxPro, the STYLE clause is also valid.


Additional reference words: vFoxWin 3.00 FoxWin 2.50 2.50a 2.50b 2.60 2.60a
docerr printout @ ... SAY Fox Print List to Print
KBCategory: kbprg kbdocerr
KBSubcategory: FxprintFont


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 29, 1996
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.