Ver Mensaje Individual
  #2  
Antiguo 02-06-2005
Avatar de Neftali [Germán.Estévez]
Neftali [Germán.Estévez] Neftali [Germán.Estévez] is offline
[becario]
 
Registrado: jul 2004
Ubicación: Barcelona - Espańa
Posts: 19.435
Reputación: 10
Neftali [Germán.Estévez] Es un diamante en brutoNeftali [Germán.Estévez] Es un diamante en brutoNeftali [Germán.Estévez] Es un diamante en bruto
Utiliza recursos.
Extracto de un mensaje donde se explica el proceso...

//-------------------------------------------------------
You can store any kind of file as a RCDATA resource.

The following example shows this with an RTF file.

Load RTF file from resource:
Create a file textres.rc:
TESTDOC RCDATA "textdoc.rtf"
Compile this with brcc32 to textres.res.
Include it into your project with an {$R textres.res} line.
Use it similar to this method.

Código Delphi [-]
     procedure TForm1.Button2Click(Sender: TObject); 
     var   
   rs: TResourceStream; 
     Begin   
       rs := TResourceStream.Create( hinstance, 'TESTDOC', RT_
Código Delphi [-]
RCDATA );   
       try     
         richedit1.plaintext :=false;     
         richedit1.lines.loadfromstream(rs);   
       finally     
         rs.free;   
  end;   
     end; 
     

//-------------------------------------------------------
__________________
Germán Estévez => Web/Blog
Guía de estilo, Guía alternativa
Utiliza TAG's en tus mensajes.
Contactar con el Clubdelphi

P.D: Más tiempo dedicado a la pregunta=Mejores respuestas.

Última edición por Neftali [Germán.Estévez] fecha: 02-06-2005 a las 11:43:21.
Responder Con Cita