Dann müßte man den Fehler weiter eingrenzen. Geht das?
Delphi-Quellcode:
function FileName:
string;
begin
Result := ExtractFilePath(ParamStr(0)) + '
SLTest.txt';
end;
procedure TForm2.Button1Click(Sender: TObject);
var
SL: TStringList;
begin
SL := TStringList.Create;
try
SL.Add('
DP');
SL.SaveToFile(FileName);
Button2.Enabled := true;
finally
SL.Free;
end;
end;
procedure TForm2.Button2Click(Sender: TObject);
var
SL: TStringList;
begin
SL := TStringList.Create;
try
SL.LoadFromFile(FileName);
ShowMessage(SL.Text);
finally
SL.Free;
end;
end;
procedure TForm2.FormCreate(Sender: TObject);
begin
Button2.Enabled := false;
end;