Microsoft KB Archive/110772

From BetaArchive Wiki
Knowledge Base


PRB: Window Sizes in .EXE Change w/ MODIFY WINDOW SCREEN FONT

Article ID: 110772

Article Last Modified on 12/3/2003



APPLIES TO

  • Microsoft Visual FoxPro 3.0 Standard Edition
  • Microsoft FoxPro 2.5b
  • Microsoft FoxPro 2.5a
  • Microsoft FoxPro 2.5b



This article was previously published under Q110772

SYMPTOMS

When you are creating an executable file in FoxPro for Windows, you notice that the distributed application's appearance is quite different from what it was during development.

CAUSE

This difference occurs because the default font in the Windows environment is usually different than the font that FoxPro uses to dimension the main desktop.

The default font you have specified in the Screen Layout dialog box in the Screen Builder must match your current screen font.

RESOLUTION

To avoid this problem during development, issue MODIFY WINDOW SCREEN FONT "foxfont" as the first line of executable code in the executable's main program. Although this is enough to correct the problem on the development machine, it still is not enough to solve the problem on the systems the executable will eventually be run on.

To completely resolve this issue, do the following:

  1. Make MODIFY WINDOW SCREEN FONT the first line of executable code in the main program of the application.


NOTE: should be the name of the default font in FoxPro. To determine the default font, hold down the SHIFT key and choose Screen Font from the Text menu in FoxPro. By default, the font will be FoxFont, but this setting can be changed by the user. Any font can be used as the default font, but it is recommended that you use FoxFont because it can be distributed freely, unlike other TrueType fonts. If you use another font, all machines that run the application will have to have that font installed.

  1. Install FOXFONT.FON using the Fonts icon in the Windows Control Panel.


NOTE: This step must be performed on any machine that will run the executable application.

  1. Include FOXFONT.FON in the set of files to be distributed with the executable file.



Additional query words: VFoxWin FoxWin 2.00 2.50 position off screen

Keywords: KB110772