Hi,
zu Info (D7) die neue Form Height und Width muss man nach ScaleBy setzen!
Delphi-Quellcode:
const
DesHeight = 768;
DesWidth = 1024;
...
procedure TForm1.WMDisplayChange(var msg: TMessage);
begin
DoScale;
end;
procedure TForm1.OnCreate(Sender: TObject);
begin
Height := DesHeight;
Width := DesWidth;
DoScale;
end;
procedure TForm1.OnResize(Sender: TObject);
begin
DoScale;
end;
procedure TForm1.DoScale;
var
x, y : Longint;
begin
Scaled := True; // just in case it is not enabled
x := Screen.Width; // get the new Width
y := Screen.Height; // get the new Height
// scale ?
if (y <> Height) or (x <> Width) then
begin
if (x <> Width) then
ScaleBy(x, Width)
else
ScaleBy(y, Height);
Height := y;
Width := x;
end;
end;
das Problem mit den StringGrid besteht immer noch.
mfg Rumpi