Ver Mensaje Individual
  #13  
Antiguo 02-05-2008
JoseFco JoseFco is offline
Baneado
 
Registrado: dic 2007
Posts: 1.861
Reputación: 0
JoseFco cantidad desconocida en este momento
Este es mi codigo original:

Código Delphi [-]
 procedure TForm1.BitBtn1Click(Sender: TObject);
var
   i,j,indice: integer;
  Str: String;
begin
  if OpenDialog1.Execute then
    Edit1.Text:=OpenDialog1.FileName;
    Edit2.Text:=('>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>');
    Edit2.Text:=('Load File..................OK !');
  Memo1.Clear;
  //Inicializo las columnas y filas de el stringgrid donde se inicia la escritura

  with TStringList.Create do
    try
     if FileExists(Edit1.Text) then
     begin
      LoadFromFile(Edit1.Text);
      FillChar(Buffer,Sizeof(Buffer),#255);
      for i:= 0 to Count - 1 do
        Insertar(Strings[i],Buffer);
        j:= StrToInt(Label2.caption);
        Str:= EmptyStr;
       end;
      //***************************************************************

begin
  indice := 0; //Suponiendo que buffer sea un array de 1...x
  for i := 1 to 255 do begin  //2 renglones, cambialo a los renglones que esperas
     for j := 1 to 16 do begin //15 columnas
         stringgrid1.Cells[j,i] := inttohex(Buffer[indice],2);
         inc(indice);
     end;
  end;
end;
      //***************************************************************
          Str:= Str + #32 + IntToHex(Buffer[i],2);
            if ((i+1) mod 16 = 0) then
              begin
                Memo1.Lines.Add(Str);
                Str:= EmptyStr;
              end;

      if Str <> EmptyStr then
        Memo1.Lines.Add(Str);
    finally
      Free;
    end;
end;

Si lo corro asi y al final decido no bajar el file me da el error.Entiendo lo que dice roman pero en este procedimiento hago varias cosas y no entiendo a donde mover esa parte del codigo.

Un Saludo.
Responder Con Cita