Delphi-PRAXiS
Seite 2 von 2     12   

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Sonstige Fragen zu Delphi (https://www.delphipraxis.net/19-sonstige-fragen-zu-delphi/)
-   -   Delphi Programm-Icon anhand des Programm-Pfades rausfinden (https://www.delphipraxis.net/108608-programm-icon-anhand-des-programm-pfades-rausfinden.html)

Helmi 16. Feb 2008 15:33

Re: Programm-Icon anhand des Programm-Pfades rausfinden
 
Wunderbar!

Danke hat funktioniert.

Hier nochmal der komplette Code:
Delphi-Quellcode:
uses ShellApi;

procedure TForm1.Button1Click(Sender:TObject);
var
  IconIndex : Word;
  h        : hIcon;
  S        : String;

begin
  IconIndex := 0;
  S        := 'C:\Program Files\Microsoft Office\Office12\WinWord.exe';
  h := ExtractIcon(0, PAnsiChar(S), IconIndex);
  DrawIcon(Form1.Canvas.Handle, 10, 10, h);
end;
(Ich hab ihr noch eine String-Variable geschenkt)

taaktaak 16. Feb 2008 15:35

Re: Programm-Icon anhand des Programm-Pfades rausfinden
 
Prima! Dann noch viel Spaß damit :-D


Alle Zeitangaben in WEZ +1. Es ist jetzt 17:18 Uhr.
Seite 2 von 2     12   

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