Ver Mensaje Individual
  #4  
Antiguo 19-06-2019
cloayza cloayza is offline
Miembro
 
Registrado: may 2003
Ubicación: San Pedro de la Paz, Chile
Posts: 913
Reputación: 22
cloayza Tiene un aura espectacularcloayza Tiene un aura espectacular


Y el código que puse?

Necesitas un Tform + tmemo + button...

Este código llenara el memo con las líneas del archivo de texto BueCont_TXT.txt
Código Delphi [-]
procedure TForm4.Button1Click(Sender: TObject);
var
   f1 : TextFile;
   line:string;
   s:char;
begin
     AssignFile(f1, 'BueCont_TXT.txt'); //edtFile.Text);
     Reset(f1);

     memo1.lines.clear;

     while not Eof(f1) do
     begin
          Read(f1, s);
          {Evalua si S= (#13 = #$D)}
          if (s=#$D) then
          begin
              memo1.lines.Add(line);
              line:='';
          end
          else
          begin
              line:=line+s;
          end;
     end;
     closefile(f1);
end;
Que mas!!!
Responder Con Cita