How to get screen dimensions with Firemonkey FM³ ? The following code:
var
Size: TPointF;
begin
Size := FMX.Platform.IFMXScreenService.GetScreenSize;
...
end;
Results in this compiler error:
[dcc32 Error] Unit1.pas(46): E2018 Record, object or class type required
How should I use IFMXScreenService
interface to get screen size ?
Try this :
var
ScreenSize: TSize;
begin
ScreenSize := Screen.Size;
Caption := IntToStr(ScreenSize.Width) + '*' + IntToStr(ScreenSize.Height);
end;