Ist zwar völlig abwegig - aber so geht es auch:
Delphi-Quellcode:
procedure SaveStrings(sa: array of TStrings; fn: TFileName);
var
i: Integer;
fs: TFileStream;
begin
fs := TFileStream.Create(fn, fmCreate or fmShareDenyWrite);
try
for i := Low(sa) to High(sa) do
sa[i].SaveToStream(fs);
finally
fs.Free;
end;
end;
procedure TDemoForm.SaveButtonClick(Sender: TObject);
begin
// ...
with SaveDialog do
if Execute then
SaveStrings([Memo1.Lines, Memo2.Lines], FileName);
end;
Grüße vom marabu