Autor Beitrag
JJ
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 100

Windows XP 64 bit!
delphi 5
BeitragVerfasst: Mi 29.03.06 17:02 
HAllo Leute! Ich hab ein ernstes PRogblem ,was ausnahmsweise mal nicht mit dem Link zur Suchfunktion gelöst werden kann ;)
Ich habe ein Programm geschrieben und möchte ein beliebiges icon im icoformat als icon für den Tray benutzen. Ist nicht schwer.. Klar ... einfach die exe mit dem icon versehen und dann das handle von der app im befehl benutzen.... Ja das geht auch aber ich möchte noch ein 2. Trayicon für mein Programm. Und dafür möchte ich eine beliebige Datei verwenden und diese dann als Trayicon benutzen...ich habe schon antworten dazu hier im forum und bei google gesucht und auch schon gefunden nur ich raffe das mit dem NIM_MODIFY oderso nicht! Kann mir da vielleicht jemand von euch helfen? wäre wirklich sehr nett :)

_________________
Hallo!
JJ Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 100

Windows XP 64 bit!
delphi 5
BeitragVerfasst: Do 30.03.06 18:55 
hatte mir statt dem normalen Code etwa sowas vorgestellt
ausblenden Delphi-Quelltext
1:
hIcon :=LoadIcon (0,pchar(extractfilepath(application.exename)+'Tray.ico'));					

...
leider geht das aber nicht... kann mir den nniemand helfen?
ich will noch nur ein trayicon was im selben ordner wie die exe liegt

Moderiert von user profile iconmatze: Delphi-Tags hinzugefügt

_________________
Hallo!
Gausi
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 8554
Erhaltene Danke: 481

Windows 7, Windows 10
D7 PE, Delphi XE3 Prof, Delphi 10.3 CE
BeitragVerfasst: Do 30.03.06 19:25 
So sollte es gehen, wenn man ein eigene *.ico rumliegen hat. Problem ist halt, dass hIcon kein TIcon verlangt, sondern das Handle darauf.

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
var aIcon: TIcon;
//...
  aIcon:= TIcon.Create;
  aIcon.LoadFromFile(MeinIconPfad);
//...
  hIcon := aIcon.Handle;

_________________
We are, we were and will not be.
JJ Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 100

Windows XP 64 bit!
delphi 5
BeitragVerfasst: Do 30.03.06 19:31 
Es geht! Ich glaub das einfach nicht! 3x Thumbs up! Vielen Dank für deine Hilfe :)

_________________
Hallo!