Ich möchte ein Bild aus einer DLL in ein Image laden. Leider geht es nicht!
Soviel hab ich schon und nun weiß ich leider nicht mehr weiter, denn das Image will das BMP nicht akzeptieren (image1.Picture.Bitmap(Bmp)
Delphi-Quelltext
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24:
| var Bmp: TBitmap; HandleDLL: THandle; begin HandleDLL := LoadLibrary('res.dll'); if HandleDLL = 0 then ShowMessage('res.dll nicht gefunden...') else try Bmp := TBitmap.Create; try Bmp.Handle := LoadBitmap(HandleDLL, 'Bitmap1'); if Bmp.Handle = 0 then ShowMessage('Bild kann nicht geladen werden...') else image1.Picture.Bitmap(Bmp); finally Bmp.Free; end; finally FreeLibrary(HandleDLL); end; end; |
mfg 91KEY8
Bitte helft mir!