문제

How can I get the screen resolution in Firemonkey 2 (Delphi XE3)?

도움이 되었습니까?

해결책

It's all changed in XE3. The platform support has been completely overhauled. See Pawel Glowacki's article for more.

var
  ScreenSvc: IFMXScreenService;
  Size: TPointF;
begin
  if TPlatformServices.Current.SupportsPlatformService(IFMXScreenService, IInterface(ScreenSvc)) then
  begin
    Size := ScreenSvc.GetScreenSize;
    ....
  end;
end;

In spite of the overhaul, this is still not much use if you have multiple monitors. Perhaps there is some multimon support in FMX2, but it's clearly not available in IFMXScreenService.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top