Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Different screen resolutions
Message
De
14/09/1998 22:06:10
 
 
À
14/09/1998 16:36:02
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00136440
Message ID:
00136557
Vues:
27
Two things to help you on your way:
- See help under SysMetric() to determine things like screen width (which tells you your resolution)
- See help under the SetAll() method. In the Form INIT you could well do
  THIS.SetAll("FontName", SomeExpression())
  THIS.SetAll("FontSize", SomeOtherExpression())
This will set all the fonts to the evaluated return value, whcih may not be what you want. Another aproach would be in the form INIT
THIS.SetSizeAndPosition
And have the following method (pseudocode)
  FUNCTION SetSizeAndPosition
  FOR EACH oControl in THIS.Controls
    IF PEMSTATUS(oControl, "SetSizeAndPosition", 5)
      oControl.SetSizeAndPosition()
    ENDIF
  ENDFOR
Where each object knows how to display itself. This is a far slicker solution, and keep in mind that container classes should sililarly broadcast the SetSizeAndPosition() method to all their contents. The overhead for this in typical forms should be subsecond.

Note that you can use SetSizeAndPosition for other things too, like actually laying out your forms, making serurity-denied controls invisible, and so on.

>How can I create one application to run on either 1024X768 large fonts or 800X600 small fonts? The big problem is going from large to small fonts.
>
>TIA
>Robert
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform