1 (edited by v_pozidis 2020-09-18 07:19:41)

Topic: Screen resolutions

Hi to all, after finishing my program I realized that it was running perfect on my pc but not on others pc's because they had  other screen resolutions.
It didn't fit. In some cases it was to big or to small so you couldn't work on it. After searching for a solution I found a very small program  (res-o-matic) which creates  a shortcut of our software with the screen resolutions you want to run it with no problems . You can find it here https://www.softpedia.com/get/System/Sy … atic.shtml . It was the only way instead changing the screen resolutions manual when running the program. If you have a better idea please share it. Thank you

Re: Screen resolutions

I start from the minimum size and then use the "Sizeable" function

Domebil

3 (edited by v_pozidis 2020-09-18 08:25:10)

Re: Screen resolutions

domebil wrote:

I start from the minimum size and then use the "Sizeable" function

No when I run my software in other pc with other screen resolutions, even when it is in sizable, the Form fits ok but not what's in the Form

Re: Screen resolutions

Hello v_pozidis

Use Anchors to ensure that a control maintains its current position relative to an edge of its parent, even if the parent is resized.

You can also use Constraints to specify the minimum and maximum width and height of the control.
When Constraints contains maximum or minimum values, the control can’t be resized to violate those constraints.

Hope this can help you
JB

Re: Screen resolutions

use the Anchors function

Domebil

Re: Screen resolutions

Re hello v_pozidis

A piece of code found on the web

procedure ScaleForm
(F: TForm; ScreenWidth, ScreenHeight: LongInt) ;
begin
F.Scaled := True;
F.AutoScroll := False;
F.Position := poScreenCenter;
F.Font.Name := 'Arial';
if (Screen.Width <> ScreenWidth) then begin
F.Height :=
LongInt(F.Height) * LongInt(Screen.Height)
div ScreenHeight;
F.Width :=
LongInt(F.Width) * LongInt(Screen.Width)
div ScreenWidth;
F.ScaleBy(Screen.Width,ScreenWidth) ;
end;
end;

JB