Registriert seit: 29. Mai 2002
37.621 Beiträge
Delphi 2006 Professional
|
27. Dez 2002, 01:28
Oder so:
Delphi-Quellcode:
function ListViewSaveToFile(ListView: TListView; AFileName: string): Boolean;
var
fs: TFileStream;
begin
fs := TFileStream.Create(AFileName, FmCreate or fmShareDenyWrite);
try
fs.WriteComponentRes(ListView.Name, ListView);
finally
fs.Free;
end
end;
function ListViewLoadFromFile(ListView: TListView; AFileName: string): Boolean;
var
fs: TFileStream;
begin
fs := TFileStream.Create(AFileName, FMOpenRead or fmShareDenyNone);
try
fs.ReadComponentRes(ListView);
finally
fs.Free;
end
end;
Michael Ein Teil meines Codes würde euch verunsichern.
|