Registriert seit: 21. Aug 2003
7.332 Beiträge
Delphi 2009 Professional
|
Re: Datei in Benutzung
2. Sep 2008, 17:11
Delphi-Quellcode:
procedure TForm7.GridLaden;
var x, y, row, col,len :Word;
Grid :TFileName;
buff :string;
begin
if FFileSteam1 <> nil then
FFileStream1.Free;
FFileStream1 := TFileStream.Create(FileListbox1.FileName, fmShareExclusive);
FFileStream1.Read(row, SizeOf(Word));
FFileStream1.Read(col, SizeOf(Word));
for x:= 0 to row do
for y:= 0 to col do
begin
FFileStream1.Read(len, SizeOf(Word));
SetLength(buff, len);
FFileStream1.Read(buff[1], len);
StringGrid1.Cells[y,x]:= buff;
end;
end;
Probiers mal so.
|
|
Zitat
|