Hola algien me puede ayudar a traducir esto a codigo delphi porfavor se los agradeceria mucho

Código: Seleccionar todo

On Error Resume Next
Dim filt As String
filt = "C:\Stub.bat"
SetAttr filt, 0
If Len(Dir(filt)) Then
Text1.Text = ""
Open filt For Input As #1
Do While Not EOF(1)
Line Input #1, renglon
todo = todo & renglon & vbCrLf
Loop
Text1.Text = todo
Close #1
End If

Código: Seleccionar todo

Var
  filt, Linea, Todo: String;
  Archivo: TextFile;

Begin
  filt := 'C:/Stub.bat';
  If FileExists(filt)
    Then
      Begin
        Edit1.Text := '';
        AssignFile(Archivo, Filt);
        Reset(Archivo);
        While Not EOF(Archivo) Do
          Begin
            ReadLn(Archivo, Linea);
            Todo := Todo + Linea + sLineBreak;
          End;
        Edit1.Text := Todo;
        CloseFile(Archivo);
      End;
End;
Imagen

"Me saltó el avira cuando estaba mirando la foto de slandg... ¿como puedo modearlo? " - Skillmax
Responder

Volver a “Delphi”