Bitte Quelltext marginal ändern:
Delphi-Quellcode:
var fs: TFileStream;
ms: TMemoryStream;
begin
fs:=TFileStream.Create(fn, fmOpenRead);
ms:=TMemoryStream.Create;
try
ObjectResourceToText(fs, ms);
ms.Position := 0; // <-- das muss da rein, dann geht's.
Form1.Memo1.Lines.LoadFromStream(ms);
finally
fs.Free;
ms.Free;
end;
end;