Propósito, use archivos de recursos en Delphi
Este ejemplo es agregar una animación flash a nuestro programa y lanzarla cuando comience el programa.
Crea un nuevo archivo primero
Escribir contenido: flash swffile1 gracias.swf
Guardar como: swffile.rc
Luego use BRCC32.exe para generar el archivo de recursos.res
Luego agregue una línea (última línea) en Delphi
Implementación
{$ R *.dfm}
{$ R swffile.res} // Esta es la línea
Luego agregue un procedimiento:
procedimiento FlashRestoFile (const resname, reestipo, nombre de archivo: string);
varilla
FlashRes: TresourCstream;
Comenzar
FlashRes: = TresourCestream.Create (Hinstance, Resname, PChar (Restype));
intentar
FlashRes.Savetofile (nombre de archivo);
Finalmente
FlashRes.Free;
fin;
fin;
usar:
FlashrestoFile ('flash', 'swffile1', 'gracias.swf');
ShockWaveFlash1.movie: = ExtractFilePath (Paramstr (0)) + 'gracias.swf';
Shockwaveflash1.lay;