On 24.11.2013 03:26, Donald Ziesig wrote:
Image1.Picture.LoadFromLazarusResource('PIX2'); // Tried 'pix2' as well
Lazarus Resources <> FPC Resources
Lazarus Resources where the resources that were used before FPC
supported resources itself. So kick out the LResources unit and change
the call to:
=== code begin ===
res := TResourceStream.Create(HInstance, 'PIX2', 'BITMAP');
try
Image1.Picture.LoadFromStream(res);
finally
res.Free;
end;
=== code end ===
If you know the file extension (e.g. you don't allow the users to put in
a PNG resource while your default one is a BMP resource) you could also
use LoadFromStreamWithFileExt instead.
Regards,
Sven
--
_______________________________________________
Lazarus mailing list
[email protected]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus