Link to home
Start Free TrialLog in
Avatar of ibrobar
ibrobar

asked on

Display Settings

Hi All

How can I change my program dimensions in accordance to the display settings.
For example if i did my program on 800*600 and later on i install it on 1152*864.

regards

Avatar of mokule
mokule
Flag of Poland image

Use Screen.Width and height and change Your forms sizes accordingly.
Play with Align and Anchor properties of controls
Well you could write a refresh/detect screen size

procedure getsize(sender : TObject);
  private
  public
  end;

procedure TForm1.getsize(sender : TObject);
begin
scry := screen.height;
scrx := screen.width;

  if scry = 640 then
    if scryx = 480 then
    begin
    //set your forms size correctly here
    end;

  if scry = 800 then
    if scryx = 600 then
    begin
    //set your forms size correctly here
    end;

  if scry = 1024 then
    if scryx = 768 then
    begin
    //set your forms size correctly here
    end;

end;

Or you could use the good suggestion that Mokule made "Align and Anchor properties of controls"

Peace Scay7
ASKER CERTIFIED SOLUTION
Avatar of TheRealLoki
TheRealLoki
Flag of New Zealand image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of ibrobar
ibrobar

ASKER

Hi it didn't work with me have you tried before

thanks
yes, I use it a lot.
It might be your form's position.
Try setting it to fpDefaultPosOnly
Avatar of ibrobar

ASKER

Thanks a lot RealLoki , you are great

regards