Microsoft KB Archive/114668

{|
 * width="100%"|

-

The information in this article applies to:


 * Microsoft Visual FoxPro for Windows, version 3.0
 * Microsoft FoxPro for Windows, versions 2.5, 2.5a, 2.5b, 2.6

-

SUMMARY
While the ability to provide graphical screens in FoxPro for Windows applications can enhance appearance of the interface, using these screens may also require additional coding to handle differences in monitor resolutions. Below is one method of handling this situation that uses separate screens created under each of the potential screen resolutions.

MORE INFORMATION
This method is best suited to applications that use a minimal number of screens. For large numbers of screens, we recommend that they all be created under the lowest resolution to ensure that they will be visible at higher resolutions.

This example assumes that standard VGA and super VGA (SVGA) are the only two resolutions under which the application will be run. Two .SPR files, named LO_RES.SPR and HI_RES.SPR, have been created under VGA and SVGA, respectively.

To have a program automatically call the proper .SPR file, include the following command in the program:

  DO (IIF(SYSMETRIC(1)=640,'LO','HI')+'_RES.SPR') The SYSMETRIC(1) function returns the width of the current screen resolution, which is tested against 640 to see if the resolution is VGA. If so, "LO" is concatenated to "_RES.SPR", and the LO_RES.SPR file is then executed. If the resolution is not VGA, the HI_RES.SPR file is executed instead. Additional query words: VFoxWin FoxWin 2.50 font conditional off video resolution design

Keywords         : kbcode FxprgGeneral Version          : 2.50 2.50a 2.50b 2.60 3.00 Platform         : WINDOWS Issue type       :
 * }