Einzelnen Beitrag anzeigen

Benutzerbild von DGL-luke
DGL-luke

Registriert seit: 1. Apr 2005
Ort: Bad Tölz
4.149 Beiträge
 
Delphi 2006 Professional
 
#4

Re: Fehler beim Laden eines Bilds aus .dll

  Alt 9. Apr 2006, 15:42
Versuch mal, in ein lokales Bitmap zu laden und dann ins image.

Delphi-Quellcode:
  var b: TBitmap;

  b := TBitmap.create;
  H := LoadLibrary('Pictures.dll');
  if h <> 0 then
  begin
    try
      R := TResourceStream.Create(H, 'Pic00', RT_BITMAP);
      R.Position := 0 //nur zur sicherheit
      b.loadfromstream(R);
     ImgInst00.Picture.Bitmap := b;
    finally
      R.Free;
      B.free;
    end;
  end;
  FreeLibrary(h);
Lukas Erlacher
Suche Grafiktablett. Spenden/Gebrauchtangebote willkommen.
Gotteskrieger gesucht!
For it is the chief characteristic of the religion of science that it works. - Isaac Asimov, Foundation I, Buch 1
  Mit Zitat antworten Zitat