ID: Q114668
2.50 2.50a 2.50b 2.60 3.00 WINDOWS
kbui
The information in this article applies to:
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.
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 reference words: VFoxWin 3.00 FoxWin 2.50 2.50a 2.50b 2.60 font conditional off video resolution design KBCategory: kbui KBSubcategory: FxprgGeneral
Keywords : kbcode FxprgGeneral
Version : 2.50 2.50a 2.50b 2.60 3.00
Platform : WINDOWS
Last Reviewed: May 22, 1998