var aScreen :TScreen; aScreen:=Tscreen.Create(application); if aScreen.Width <> 1024 then begin aScreen.Free; ShowMessage('建議運行本系統的熒屏解析度為1024 x 768模式.'); winexec('control.exe desk.cpl',SW_SHOWNORMAL); //強制熒屏解析度為800x600 Halt; end
var x:longint; a:string; begin x := GetSystemMetrics(SM_CXSCREEN); Str(x,a); Label1.Caption := '显示器水平分辨率' + a; x := GetSystemMetrics(SM_CYSCREEN); Str(x,a); Label2.Caption := '显示器垂直分辨率' + a; end;
Label1.Caption:=IntToStr(Screen.Width)+','+IntToStr(Screen.Height);
aScreen :TScreen; aScreen:=Tscreen.Create(application);
if aScreen.Width <> 1024 then
begin
aScreen.Free;
ShowMessage('建議運行本系統的熒屏解析度為1024 x 768模式.');
winexec('control.exe desk.cpl',SW_SHOWNORMAL); //強制熒屏解析度為800x600
Halt;
end
x:longint;
a:string;
begin
x := GetSystemMetrics(SM_CXSCREEN);
Str(x,a);
Label1.Caption := '显示器水平分辨率' + a;
x := GetSystemMetrics(SM_CYSCREEN);
Str(x,a);
Label2.Caption := '显示器垂直分辨率' + a;
end;