procedure TForm1.Button1Click(Sender: TObject);
var
MemoryStream: TMemoryStream;
begin
MemoryStream := TMemoryStream.Create;
try
RichEdit1.Lines.SaveToStream(MemoryStream);
MemoryStream.Seek(0, soFromBeginning);
RichEdit2.Lines.LoadFromStream(MemoryStream);
finally
MemoryStream.Free;
end;
end;
|