Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Different screen resolutions
Message
From
14/09/1998 22:06:10
 
 
To
14/09/1998 16:36:02
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00136440
Message ID:
00136557
Views:
28
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform