![]() |
Vom Form Handle zum Icon
Hallo,
welche Möglichkeit habe ich, wenn ich das Fenster Handle habe, mir das Icon des Fensters in ein TBitmap zu kopieren? Danke Oliver |
Re: Vom Form Handle zum Icon
Du kommst vom fensterhandle zum prozesshandle, von dem zum modulnamen und damit zum pfad der exe. und aus der kannst du die icons auslesen.
Geht alles mit WinAPI-Funktionen - Frag mich aber nicht, wie die heissen. |
Re: Vom Form Handle zum Icon
Zitat:
|
Re: Vom Form Handle zum Icon
ich weiß zwar nicht obs hilft, aber schau dir mal das hier an:
![]() |
Re: Vom Form Handle zum Icon
Zitat:
Delphi-Quellcode:
probiert, liefert aber leider als Handle 0 zurück.
vbitmap.Handle := GetProp(AHandle, 'PROP_ICON');
|
Re: Vom Form Handle zum Icon
@backdraft: Ich meinte auch das Icon vom Fenster...
|
Re: Vom Form Handle zum Icon
Zitat:
ich muss doch auch irgendwie rankommen, wenn das prog läuft |
Re: Vom Form Handle zum Icon
Habs gefunden, es geht mit:
vIcon := SendMessage(AHandle, WM_GETICON, ICON_SMALL, 0); oder vIcon := SendMessage(AHandle, WM_GETICON, ICON_BIG, 0); von da aus gehts ja leicht zum Bitmap. Danke trotzdem |
Re: Vom Form Handle zum Icon
mal ne blöde frage ... :oops:
wie komm ich dann weiter zum bitmap? weil des sendmessage liefert mir doch nur 'nen ... integer? MfG - Ghost007 |
Re: Vom Form Handle zum Icon
Wenn mich nicht alles täuscht, bekommst du das Handle.
Delphi-Quellcode:
with TBitmap.Create do
begin Handle := vIcon; ... Free; end; |
Alle Zeitangaben in WEZ +1. Es ist jetzt 20:26 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