I find a solution for Loading Bitmap From Resource file on How to store images in FireMonkey? And I've tried to use it in my Firemonkey application, but it can't find Resource and raises an error "EresNotFound". My Resource .RC File Is Like This
Bitmap_1 BITMAP "Test.bmp"
and my Code is
procedure Tform1.load_image_from_resource(var Im1: Timage; res_name: String);
var InStream: TResourceStream;
begin
InStream := TResourceStream.Create(HInstance, res_name,RC_RTDATA);
try
Im1.Picture.Bitmap.LoadFromStream(InStream);
finally
InStream.Free;
end;
end;
procedure TForm1.Button1Click(Sender: TObject);
begin
Load_image_from_resource(Image1,'Bitmap_1');
end;
I also found a solution on the question Delphi 2010: unable to find resource - EResNotFound. But it still doesn't find recource