Ver Mensaje Individual
  #4  
Antiguo 31-05-2016
Avatar de roman
roman roman is offline
Moderador
 
Registrado: may 2003
Ubicación: Ciudad de México
Posts: 20.269
Reputación: 10
roman Es un diamante en brutoroman Es un diamante en brutoroman Es un diamante en bruto
Ejemplo:

Código Delphi [-]
procedure TForm1.Button1Click(Sender: TObject);
var
  ResourceStream: TResourceStream;
  TextStream: TMemoryStream;

begin
  ResourceStream := nil;
  TextStream := nil;

  try
    ResourceStream := TResourceStream.Create(HInstance, 'TFORM1', RT_RCDATA);
    TextStream := TMemoryStream.Create();

    ObjectBinaryToText(ResourceStream, TextStream);
    TextStream.Seek(soFromBeginning, 0);

    Memo1.Lines.LoadFromStream(TextStream);
  finally
    ResourceStream.Free;
    TextStream.Free;
  end;
end;

LineComment Saludos
Responder Con Cita