Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Andy Kramek
  Where is Andy Kramek?
 Hot Springs Village
 Arkansas - United States
 Andy Kramek
 To: Gaetano Nicosia
  Where is Gaetano Nicosia?
 Brescia
 Italy
 Gaetano Nicosia
 Tags
Subject: RE: Dimension of Form
Thread ID: 78941 Message ID: 78951 # Views: 1 # Ratings: 0
Version: Visual FoxPro 9 Category: Forms
Date: Tuesday, October 11, 2005 1:13:01 PM         
   


Hi Gaetano

> It's possible to create a Form with variable dimension, depending on monitor resolution ?
> If Yes, how can perform this ?


Yes. The key is to use the SYSMETRIC() function to get the current Screen Width and Height settings (do this in the Init() of the form). Then you can adjust the size of the form accordingly. However, that will not re-size, nor re-position the controls on the form - it merely makes the form larger/smaller.

There a number of re-sizing classes that you can add to your form which will handle the task of adjusting control sizes, or, as Eric suggests, you can use Anchors.

One thing to be aware of is that re-sizing a control (or using Anchors) does not adjust the font so you end up with a bigger control, but the font size remains the same which can look odd.

Regards
Andy Kramek
Microsoft MVP (Visual FoxPro)
Tightline Computers Inc, Akron Ohio, USA

ENTIRE THREAD

Dimension of Form Posted by Gaetano Nicosia @ 10/11/2005 11:23:24 AM
RE: Dimension of Form Posted by Eric den Doop @ 10/11/2005 11:27:33 AM
RE: Dimension of Form Posted by Nuno Ruivo @ 10/11/2005 12:56:26 PM
RE: Dimension of Form Posted by Andy Kramek @ 10/11/2005 1:13:01 PM
RE: Dimension of Form Posted by Gaetano Nicosia @ 10/11/2005 3:02:25 PM