更新时间:2023-12-02 11:05:28
好的,我们找到了答案.
ok, we found the answers.
有一个单元 FMX.Platform 可以提供非常重要的数据.
There is unit FMX.Platform that procides quite vital data.
var
ScreenSvc: IFMXScreenService;
begin
if TPlatformServices.Current.SupportsPlatformService(IFMXScreenService, IInterface(ScreenSvc)) then
begin
<your code>
end;
end;
结果值为:
ScreenSvc.GetScreenSize.X
ScreenSvc.GetScreenSize.Y
ScreenSvc.GetScreenScale