I'm trying to make my program change the layout scale at runtime. I developed this code based on an existing powershell script. But it compiles but when running, it returns an error.
Error:
The procedure entry point SystemParametersInfo could not be located in the dynamic link library.
var
Form1: TForm1;
function SystemParametersInfo(uiAction, uiParam: UINT; pvParam: Pointer; fWinIni: UINT): BOOL; stdcall; external 'user32.dll';
implementation
{$R *.dfm}
function SetScaling: Boolean;
begin
Result := SystemParametersInfo($000F, 125, nil, 1);
end;
procedure TForm1.FormCreate(Sender: TObject);
begin
SetScaling;
end;