type
{$I jedi.inc}
{$IFDEF DELPHI28_UP}
{$DEFINE HasPixelsPerInch}
{$ENDIF}
TBaseDataModule = class(TDataModule)
{$IFNDEF HasPixelsPerInch}
protected
// Ignore PixelsPerInch property in TFrame introduced since Delphi 11
procedure DefineProperties(Filer: TFiler); override;
procedure IgnorePixelsPerInch(Reader: TReader);
{$ENDIF}
end;
{$IFNDEF HasPixelsPerInch}
procedure TBaseDataModule.DefineProperties(Filer: TFiler);
begin
inherited DefineProperties(Filer);
Filer.DefineProperty('PixelsPerInch', IgnorePixelsPerInch, nil, False);
end;
procedure TBaseDataModule.IgnorePixelsPerInch(Reader: TReader);
begin
Reader.ReadInteger;
end;
{$ENDIF}
I created a base module to solve this kind of issue