0
我有兩個應用程序使用一些相同的形式。我注意到當我運行這些應用程序時,這些表單顯示的方式不同。我把這個代碼在項目源的頂部:Delphi屏幕尺寸在同一臺機器上的兩個應用程序上有所不同...如何解決?
var f: TextFile;
s: String;
{$R *.res}
begin
s := TPath.GetFileNameWithoutExtension(Application.ExeName);
AssignFile(f, s + '-screen.txt');
Rewrite(f);
Writeln (f, s + '.Desktop TLHW: ' + IntToStr(screen.DesktopTop) + ', ' +
IntToStr(screen.DesktopLeft) + ', ' +
IntToStr(screen.DesktopHeight) + ', ' +
IntToStr(screen.DesktopWidth));
CloseFile (f);
ADAM2-screen.txt顯示:aDAM2.Desktop TLHW:0,0,720,1280
ADAM3-screen.txt顯示:ADAM3 .Desktop TLHW:0,1080,1920
我不明白這是怎麼發生的,並且無法解決這個問題,特別是考慮到TScreen屬性是隻讀的。
謝謝!正是我需要去的。 – skippix