title: Load image from embedded resource
body: <p>I am trying to assign an image(Image1) a picture at Run-time.</p>
  <p>Since I can't set a property to load from resource. So I need to load at run time.</p>
  <p>I have the code</p>
  <pre><code>procedure TForm1.FormCreate(Sender: TObject); 
  var RS:Tresourcestream ; 
  begin 
  RS := TResourceStream.Create(HInstance,'Splashscreen_Background', RT_RCDATA);   
  image1.Picture.Bitmap.LoadFromResourcename(HInstance,'splashscreen_background'); 
  end;
  </code></pre>
  <p>But it just loads the forms with a blank Image. aswell as:</p>
  <pre><code>procedure TForm1.FormCreate(Sender: TObject);
  BitMap1 : TBitMap;
  begin
  BitMap1 := TBitMap.Create;
  BitMap1.LoadFromResourceName(HInstance,'Live');
  image1.Picture.Bitmap.Assign(Bitmap1);
  end;
  </code></pre>
  <p>I have no idea if the bottom one would work at all, guess not. Just something I tried.</p>
  <p><img src="https://i.stack.imgur.com/TAA4z.jpg" alt="Resource and Image" /></p>