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
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
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
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
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Hi it didn't work with me have you tried before
thanks
thanks
yes, I use it a lot.
It might be your form's position.
Try setting it to fpDefaultPosOnly
It might be your form's position.
Try setting it to fpDefaultPosOnly
ASKER
Thanks a lot RealLoki , you are great
regards
regards
Play with Align and Anchor properties of controls