Попробуйте эти коды. Сначала добавьте FMX.Platform для использования:
function ScreenResolutionChanged(old, new: string): Boolean;
begin
if old <> new then
Result := True
else
Result := False;
end;
function getScreenSize: string;
var
ScreenSvc: IFMXScreenService;
ScreenSize: TSize;
begin
if TPlatformServices.Current.SupportsPlatformService(IFMXScreenService,
IInterface(ScreenSvc)) then
begin
Result := Format('Resolution: %fX%f', [ScreenSvc.GetScreenSize.X,
ScreenSvc.GetScreenSize.Y]);
end;
end;
procedure TForm2.Button1Click(Sender: TObject);
var
oldScreenSize, newScreenSize: string;
begin
oldScreenSize := getScreenSize;
Sleep(10000); // Wait 10 Sec
newScreenSize := getScreenSize;
if ScreenResolutionChanged(newScreenSize, oldScreenSize) then
ShowMessage('Screen Resolution Changed ' + #10#13 + oldScreenSize + #10#13 +
newScreenSize)
else
ShowMessage('Screen Resolution NOT Changed ' + #10#13 + oldScreenSize +
#10#13 + newScreenSize);
end;