Saludos, foristas,
A todas, todas, cómo puedo crear un TImage con archivo jpg en tiempo de ejecución. Este es el código, se crea dentro de un scrollbox un componenete Image con sus características y su archivo jpg.
Código Delphi
[-]
With TImage.Create(Self) do
Begin
Picture.Graphic:=TJpegImage.Create; Parent:=ScrollBox1;
Top:=(ScrollBox1.ControlCount)*(Height+4);
Left:=ScrollBox1.Left+110;
Cursor:=crHandPoint;
Stretch:=True;
Height:=112;
Width:=94;
xa:='sin_foto.jpg';
if DirectoryExists('c:\ejemplo\') then
Begin
Try
if FileExists(xa) then Picture.Graphic.LoadFromFile(xa);
except
Picture.Graphic.LoadFromFile('sin_foto.jpg');
end;
end
else
Begin
showmessage('No existe directorio...');
end;
end;
Gracias, por la atención.....