I modified @Amateurprofi code to support x:10, changed to return float and wrote format function:
Delphi-Quellcode:
function GetScreenProportion(const AWidth, AHeight: Cardinal): string;
var
AspectRatio: Single;
X, Y: Extended;
begin
AspectRatio := GetScreenAspectRatio(AWidth, AHeight);
X := Int(AspectRatio);
Y := Frac(AspectRatio) * 100;
if Int(Y) <> 10 then
Y := Y / 10
;
Result := Format('%.0f:%.0f', [X, Y])
end;
Thanks