![]() |
Icon aus Resource in eine Imagelist?
siehe topic,
wie mache ich das? hatte es schon hiermit versucht:
Delphi-Quellcode:
geht aber nicht :\
imagelist1.ResourceLoad(restype, 'ICO_READ_CD', clRed);
|
Re: Icon aus Resource in eine Imagelist?
Hi,
das sollte so funktionieren:
Delphi-Quellcode:
ImageList1.GetResource(rtIcon, 'ICO_READ_CD', 0, lrNone, clRed);
|
Re: Icon aus Resource in eine Imagelist?
hallo, leider geht es nicht :(
die imagelist ist immernoch leer, denn:
Delphi-Quellcode:
funktionietr nicht(weil kein bild da) :(
imagelist1.GetIcon(0, image1.Picture.Icon);
|
Re: Icon aus Resource in eine Imagelist?
Hm, komisch.
Aber wenn's mit den Borland-Funktionen nicht geht, dann eben ganz altmodisch über die Win-API :wink: :
Delphi-Quellcode:
var
Hd: THandle; Ico: TIcon; //... Hd := LoadImage(HInstance, 'MAINICON', IMAGE_ICON, 0, 0, LR_DEFAULTCOLOR); Ico := TIcon.Create; try Ico.ReleaseHandle; Ico.Handle := Hd; ImageList1.AddIcon(Ico); finally Ico.Free; end; |
Alle Zeitangaben in WEZ +1. Es ist jetzt 15:49 Uhr. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz