Screen resolution problems in FPW 2.6

Screen resolution problems in FPW 2.6

Post by Rod Smit » Wed, 13 Mar 1996 04:00:00



HELP!  I created a standalone program on my home computer.  I thought I
worked out all the bugs so I tried to install it on another machine.  The
problem is that when I run the program on the new machine all my input
fields and buttons are a couple of centimeters out of place, and even
overlapping one another.  Is this due to a difference in monitor size
(14" vs 15") or resolution, and how can I stop it?  Thanks.
 
 
 

Screen resolution problems in FPW 2.6

Post by Anderson Jef » Sat, 23 Mar 1996 04:00:00




> >HELP!  I created a standalone program on my home computer.  I thought
> I
> >worked out all the bugs so I tried to install it on another machine.  
> The
> >problem is that when I run the program on the new machine all my input
> >fields and buttons are a couple of centimeters out of place, and even
> >overlapping one another.  Is this due to a difference in monitor size
> >(14" vs 15") or resolution, and how can I stop it?  Thanks.

> I have the same problem.  I found that the problem originates in a file
> called foxpro.ini located in the windows directory (specifically the
> default font used).  It seems that every computer has to have the same
> copy of that file.  I'm currently looking for a way to have it copied
> from within my app, but Windows updates it occasionally when the FoxPro
> environment changes.

> Anyone else know how to deal with this.

> Bill

I have had the exact same type of problem. FOxpro gets its spacing of its current window
from the font of its mother window(When starting usually the foxpro main screen) Start your app with a bottonless
screen ,and define it with a fixed font

Janderman

- Show quoted text -


 
 
 

Screen resolution problems in FPW 2.6

Post by Randy Bur » Sun, 24 Mar 1996 04:00:00




>>HELP!  I created a standalone program on my home computer.  I thought I
>>worked out all the bugs so I tried to install it on another machine.  The
>>problem is that when I run the program on the new machine all my input
>>fields and buttons are a couple of centimeters out of place, and even
>>overlapping one another.  Is this due to a difference in monitor size
>>(14" vs 15") or resolution, and how can I stop it?  Thanks.

>Define your windows using a font that will be available on all machines.  I
>always use Arial as it is almost always installed on a windows machine.

>-bruce

>--
>Bruce D. Rempe   *-----------   Home of   ----------------

>(319) 342-3566   *- Automated Conference Communications --
>WWW PAGE:  http://www.netins.net/showcase/message/tmb.html
>--- "The Conference/Convention Communications Experts" ---

DON'T user the default font, this can cause a problem if your windows
is set to use small fonts and the other is set to use large (and
visversa)

Randy
/---------------------------------------\


Quote:>---------------------------------------<

| Burke's Law: You can't win, even when |
|    you do, you can't win.             |
\---------------------------------------/
 
 
 

Screen resolution problems in FPW 2.6

Post by bill » Tue, 26 Mar 1996 04:00:00



Quote:

>HELP!  I created a standalone program on my home computer.  I thought
I
>worked out all the bugs so I tried to install it on another machine.  
The
>problem is that when I run the program on the new machine all my input
>fields and buttons are a couple of centimeters out of place, and even
>overlapping one another.  Is this due to a difference in monitor size
>(14" vs 15") or resolution, and how can I stop it?  Thanks.

Right after sending my last message, I was researching a different
problem and discovered a way to solve this problem.

In the startup program put this command in.

modify window screen font 'arial', 10

"screen" cannot be abbreviated, and obviously use whatever font you
wish to be used throughout the session as the default font.

Bill

 
 
 

Screen resolution problems in FPW 2.6

Post by Scott A Huggin » Tue, 26 Mar 1996 04:00:00


What I have found is that it is best to develop in VGA (640X480) mode.  This
will allow you to use any font and will work great for ANY resolution.  If you
develop in 600X800 then use a machine with 640X480, all of your buttons, text
etc. will be off.

Hope this helps,
Scott

 
 
 

Screen resolution problems in FPW 2.6

Post by Chris Moor » Thu, 28 Mar 1996 04:00:00



Quote:> Path:

spright.demon.co.uk!news.demon.co.uk!dispatch.news.demon.net!demon!tank.news.pipex.net!pipex!newsfe
ed.internetmci.com!in2.uu.net!newsflash.concordia.ca!news.nstn.ca!news

> Newsgroups: comp.databases.xbase.fox
> Subject: Screen resolution problems in FPW 2.6
> Date: 12 Mar 1996 12:38:44 GMT
> Organization: Parks Canada
> Lines: 7

> NNTP-Posting-Host: ts4-14.hfx.inforamp.net
> Mime-Version: 1.0
> Content-Type: text/plain; charset=us-ascii
> Content-Transfer-Encoding: 7bit
> X-Mailer: Mozilla 1.22 (Windows; I; 16bit)

> HELP!  I created a standalone program on my home computer.  I thought I
> worked out all the bugs so I tried to install it on another machine.  The
> problem is that when I run the program on the new machine all my input
> fields and buttons are a couple of centimeters out of place, and even
> overlapping one another.  Is this due to a difference in monitor size
> (14" vs 15") or resolution, and how can I stop it?  Thanks.

I'm just coming to the end of a project in FPW26 and have had the same problem. I think the problem
you have is with the VGA mode selected in Window and what Windows does with the fonts.

The problem is also with FoxPro which in a valiant but utterly futile attempt to provide backward
compatability has made window and object sizing based on Font sizing. When switching from normal to
a 'Large Font' mode some fonts size differently.(eg. MS Sans Serif 8 becomes MS Sans Serif 10)

The problem basically (at last I hear you cry !) is that FPW places and sizes it's objects
(Windows, fields etc.) based on the font and size of the parent object. If you have a machine that
offers 1024x768 in small and large fonts, try defining a screen in small fonts and then switching
to large ones. You will probably see objects move and change size.

There are some fonts (eg. MS Sans Serif 8, Bold) that resize in the different modes. I found that
defining my screen desktop and all of my windows in the font that all of them resized when
switching from small to large fonts. Also only use one VGA mode when actually designing screens.

The only problem is in multi-column list boxes in FPW26 which require a proportional font. I don't
know of one which keeps the size when switching modes. Careful here because some say that FoxFont
will scale with the screen mode. I have a number of screens that say otherwise.

Use MODIFY WINDOW SCREEN FONT... to change the overall desktop font.


 
 
 

Screen resolution problems in FPW 2.6

Post by WSchma » Sat, 30 Mar 1996 04:00:00


The original problem is the use of small and big fonts in Windows video
driver and that FPW uses "foxels" for the screen coordinates.
The only soution to this problem is to use True Type fonts all over all.
You've to use it either in screens, window definitions, get field and last
but not least in the definition of the FPW-main window.

Wolfgang Schmale, Germany

 
 
 

Screen resolution problems in FPW 2.6

Post by Miki » Thu, 04 Apr 1996 04:00:00


On 18 Mar 1996 14:28:02 GMT, re...@netins.net (Bruce Rempe) wrote:

>In article <4i3r8k$...@news.nstn.ca>, rdsm...@fox.nstn.ca says...

>>HELP!  I created a standalone program on my home computer.  I thought I
>>worked out all the bugs so I tried to install it on another machine.  The
>>problem is that when I run the program on the new machine all my input
>>fields and buttons are a couple of centimeters out of place, and even
>>overlapping one another.  Is this due to a difference in monitor size
>>(14" vs 15") or resolution, and how can I stop it?  Thanks.

***********************************************************************
Here is an article I downloaded on this subject outlining (3)
differant solutions to the problem.                     Mikish
***********************************************************************

Microsoft? FoxPro for Windows       ?
Versions:       2.50, 2.50a, 2.50b, 2.60, 2.60a Product Support
Services
Subject:        Screen Issues in FoxPro for Windows     Application
Note
Contents:       16 Pages, No Disk       10/95 * FW1180

INFORMATION PROVIDED IN THIS DOCUMENT AND ANY SOFTWARE THAT MAY
ACCOMPANY THIS DOCUMENT (collectively referred to as an Application
Note) IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER
EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE.
The user assumes the entire risk as to the accuracy and the use of
this Application Note. This Application Note may be copied and
distributed subject to the following conditions:  1) All text must be
copied without modification and all pages must be included;  2) If
software is included, all files on the disk(s) must be copied without
modification (the MS-DOS?  utility diskcopy is appropriate for this
purpose);  3) All components of this Application Note must be
distributed together;  and  4) This Application Note may not be
distributed for profit.

        Copyright ? 1995 Microsoft Corporation.  All Rights Reserved.
        Microsoft, MS-DOS, Windows, FoxPro, and Visual Basic are
registered trademarks and Visual C++ is a trademark of Microsoft
Corporation.
        This document was created using Microsoft Word for Windows?.

This application note summarizes information about screen and font
issues in FoxPro for Windows, emphasizing areas that are likely to
impact application design. Information for this document was taken
from several Microsoft Knowledge Base (KB) articles. Referenced KB
articles are listed at the end of this document.

Two main screen issues can seriously impact application design in
FoxPro for Windows:

Fonts: Issues include font-related considerations when designing GUI
applications in FoxPro.

Screen resolutions: Issues include handling multiple screen
resolutions in an application. Methods of resolving these issues are
suggested.

Fonts and Font Metrics

System Font Functions
Use the following FoxPro functions when working with fonts. (For
further information on these functions, please see the Help file.)

FONTMETRIC() - This function returns font values for the installed
fonts of the operating system, such as the character height of the
specified font in pixels and the average character width in pixels.
The FONTMETRIC() function returns many other values; however, for this
article, these are the two most important attributes.

WFONT() - This function returns the name, size, or style of the
current font for a window in FoxPro.

AFONT() - This function places information about available fonts
into an array. It is useful for determining whether
application-specific fonts are available on a system.

SROWS() - This function returns the number of rows of foxels
available in the main FoxPro window.

SCOLS() - This function returns the number of columns of foxels
available in the main FoxPro window.

Units of Measurement in FoxPro
In FoxPro 2.x, for Windows, calculations of positions of objects are
based on a unit of measurement known as a foxel.

The foxel was developed to provide a uniform and consistent unit of
measurement to ensure the accurate placement of objects between
platforms. A foxel is defined as a fractional row and column value,
expressed in decimal form. The foxelrow indicates a single vertical
row of characters, while the foxelcol indicates a single horizontal
character.

The foxelrow size varies depending on the height of the current font.
The foxelcol size varies depending on the average width of characters
of the current font. The functions SROWS() and SCOLS() can be used to
determine the number of foxel rows and foxel columns in the main
FoxPro window.

These size measurements are significant because the number of columns
available varies depending on the average width of characters in the
current font. To show the difference, you can use the command MODIFY
WINDOW SCREEN FONT with the FoxFont and Arial fonts in  5- and 7-point
sizes. The following table shows the differences between these fonts
and point sizes:

FoxFont - 5 pt  Arial - 5 pt    FoxFont - 7 pt  Arial - 7 pt
SROWS() =  77.78        SROWS() = 100.00        SROWS() =  77.78
SROWS() =  58.33
SCOLS() = 146.29        SCOLS() = 341.33        SCOLS() = 146.29
SCOLS() = 256.00

Arial 5 point has more foxel columns and foxel rows than FoxFont 5
point does. When the point size is increased to 7, FoxFont has a
larger number of rows available to it because FoxFont 7 point letters
are not as tall as Arial 7 point letters. Because Arial letters are
narrower than FoxFont letters,  there are more columns available in
Arial 7 point.

FoxPro uses the font metrics of a given font when determining where to
place objects such as windows or GET and SAY fields. The syntax for an
@...GET command is:

@ <vpos>,<hpos> GET <variable> SIZE fHeight, fWidth FONT
<fontname>,<fontsize>

The following formulas are used by FoxPro in the @...GET command to
determine where to place objects on the screen:

VPOS = (<Top> + 1)/FONTMETRIC(1,<WindowFont>,<pointsize>)
HPOS = (<Left> + 2)/FONTMETRIC(6,<WindowFont>,<pointsize>)

Given these formulas, if both TOP and LEFT are equal to 100, then the
formulas for VPOS and HPOS for the GET object using FoxFont and Arial
are:

FoxFont Arial
VPOS = (100 + 1)/FONTMETRIC(1,"FoxFont",5)    VPOS = (100 +
1)/FONTMETRIC(1,"Arial",5)
HPOS = (100 + 2)/FONTMETRIC(6,"FoxFont",5)    HPOS = (100 +
2)/FONTMETRIC(6,"Arial",5)

FoxFont yields a VPOS of 11.22 and an HPOS of 14.57. Arial yields a
VPOS of 14.43 and an HPOS of 34.00. Both sets of  values are based on
the average character width in foxels. The finished @...GET command
for each of these two fonts is:

FoxFont Arial
@ 11.22, 14.57 GET myvar        @ 14.43, 34.00 GET myvar

When the font name and point size are not specified, the FONTMETRIC
function uses the default Windows screen font. This last point is
significant; it is the reason why Microsoft recommends that you not
leave the desktop font to random chance. Instead, use an explicit
MODIFY WINDOW SCREEN FONT command in the Setup code of your
application. FoxPro uses the font specified in the MODIFY WINDOW
SCREEN FONT command to calculate the placement of screen objects. The
topics in the following pages cover some of the common font-related
problems you may encounter. Each topic deals with a specific issue and
provides suggestions and tips about how to resolve it.

Screens Change Positions in Executable
If the font(s) you used to develop your application are not available
in the run-time environment, your screens may be in different
positions in the executable than they are in the development
environment.

 This occurs because the default font in the Windows environment is
often different from the font FoxPro uses to dimension the main
desktop. The current FoxPro desktop font should be explicitly set in
your code, and the default font for a new screen created using the
Screen Builder should match the FoxPro desktop font. To ensure that
application windows are located properly when the application or EXE
file is run, the following four conditions must be met:

You must have determined your window positions in the Screen Layout
dialog box in the Screen Builder.

The default font of the screens must match the desktop font. If the
desktop font is Arial, the screen font should also be Arial.

The font point sizes used in the development environment must be
identical to those in the run-time environment.

The display resolution used in the development environment and in
the run-time environment must be identical.

To resolve this problem in your own applications, follow these steps:

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

Note: <Font name> should be the name of the default font you are using
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 usually 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
fonts. If you use a different font, all computers that run the
application must have that font installed.

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

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

Note: This step must be performed on all computers that will run the
executable application.

Generally, FoxFont is a safe choice to use as your desktop font as
well as your screen font because it can legally  be distributed with
your application. The desktop font is the font specified with the
MODIFY WINDOW SCREEN FONT command. The screen font is the font
specified by choosing Layout from the Screen menu, and then choosing a
font from the Font section. There are, however, certain conditions
under which you may not want to use FoxFont as the default desktop and
screen font. FoxFont is a small font, so running your application ...

read more »

 
 
 

1. Help - Screen resolution FPW 2.6 and VFP 5.0

I have two questions that need answering.  Our application, built in FPW
2.6, only seems to look and work best when the screen resolution is set at
640 x 480 with small fonts.  When it's loaded onto a computer set at
different resolution, 800 x 600 as an example, not only are the screen
images out of wack, but the users sometimes get errors messages.  Is there
anyway to correct this problem in FPW 2.6?  We're currently converting to
VFP 5.0, will we be able to set up the screen images so that they look ok
regardless of the resolution the user has their computer screen set at?

You can download our software at: www.go-transtec.com if you're interested
in seeing what I mean.

Looking forward to a reply.

Regards,
Nexus

2. GENIO

3. fpw 2.6 -- screen problems

4. kerberos auth and login to database using perl DBD/DBI

5. FPW 2.6 Forms / Report / Screen integration problem.

6. Informix Administration Guide

7. Q: Fonts, screen resolution, positioning in Fox 2.6

8. Strange Screen Appearance in FPW 2.6

9. fpw 2.6 -- position off screen

10. fpw 2.6 -- screen help

11. FPW 2.6 Main Screen

12. FPW 2.6 - Screen pull-down fields