Autor Beitrag
del1312
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 190



BeitragVerfasst: Di 11.07.06 10:22 
hab nen kleines tool was im tray minimiert wird. nun hätte ich gern das bei einer bestimmten aktion das icon als meldung anfängt zu blinken wie kann man sowas machen? hab als code das hier:

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
  Begin
  Application.ShowMainForm := False; //Programm gar nicht erst anzeigen
  Hide;
  with NIM do begin
    cbSize := SizeOf (nIM);
    Wnd := Handle;
    uID := 0;
    uFlags := NIF_ICON or NIF_MESSAGE or NIF_TIP;
    uCallbackMessage := IC_CLICK;
    hIcon := Application.Icon.Handle;
    szTip := 'Statusmelder!';
  end;
  Shell_NotifyIcon(NIM_ADD, @NIM);
  end;


ich würde es ja so machen das in nem timer das icon ständig geändert wird, also zwei verschiedene, dann wirkt es ja als ob es blinkt. kann mir bitte iner helfen?!?

Moderiert von user profile iconGausi: Quote- durch Delphi-Tags ersetzt
Narses
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Administrator
Beiträge: 10183
Erhaltene Danke: 1256

W10ent
TP3 .. D7pro .. D10.2CE
BeitragVerfasst: Di 11.07.06 10:47 
Moin!

Schau mal nach Suche in: Delphi-Forum, Delphi-Library COOLTRAYICON, warum das Rad immer neu erfinden... ;)

cu
Narses

_________________
There are 10 types of people - those who understand binary and those who don´t.
del1312 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 190



BeitragVerfasst: Di 11.07.06 10:51 
ach naja ich hab mir das jetzt so zu recht gefummelt und irgendwie komm ich mit dem cooltrayicon nicht klar :oops:
DarkLord05
ontopic starontopic starontopic starontopic starontopic starofftopic starofftopic starofftopic star
Beiträge: 449

WinXP Pro SP2
Opera; Delphi 3 Pro; Delphi 2005, Turbo Delphi, dev-c++, Eclipse, MS Visual Studio .NET 2003, MS Visual C++
BeitragVerfasst: Di 11.07.06 12:21 
Hi,

was bekommst da denn nicht hin?
del1312 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 190



BeitragVerfasst: Di 11.07.06 12:50 
naja ich weiss nicht genau wo das angezeigte icon steht und wo ich ein zweites eintragen muss.
Narses
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Administrator
Beiträge: 10183
Erhaltene Danke: 1256

W10ent
TP3 .. D7pro .. D10.2CE
BeitragVerfasst: Di 11.07.06 12:57 
Moin!

Du kannst kein zweites Eintragen, du mußt im Wechselintervall das Icon austauschen. ;)

Deshalb ja: CoolTrayIcon, da geht das alles mit ein paar Klicks und Methoden. :D

cu
Narses

_________________
There are 10 types of people - those who understand binary and those who don´t.
del1312 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 190



BeitragVerfasst: Di 11.07.06 13:03 
hm mist, dann muss ich das doch mal probieren, hatte es runtergeladen und auch installiert. nun seh ich nen "CoolTrayIcon" Reiter mit zwei Kompos. Was muss ich jetzt genau machen? Die einfach in die Form ziehen und dann minimieren klappt nicht ?!?
Hobby-Programmierer
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 238
Erhaltene Danke: 4

Win XP Pro, Vista Ultimate Trial :o)
D6 Pro, D7 Pro, Turbo, XE SE
BeitragVerfasst: Di 11.07.06 13:32 
Mahlzeit :)
... ich hatte vor einigen Jahren das gleiche Prob., hab das folgendermassen gelöst
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
...
var nIM: TNOTIFYICONDATA;
    WM_TASKBARRESTART: Cardinal;
    ShowIcon: Boolean;

...
procedure TForm_Start.Timer1Timer(Sender: TObject);
begin // Icon wechseln und blinken
  ShowIcon:= not ShowIcon;
  if ShowIcon then
    nIM.hIcon:= LoadIcon(0, IDI_EXCLAMATION)
   else
    nIM.hIcon:= LoadIcon(1, IDI_EXCLAMATION);
  nIM.szTip:= 'neuer Hint !'// neuer Hint
  Shell_NotifyIcon(NIM_MODIFY,@nIM);
end;


LG Mario
Einloggen, um Attachments anzusehen!


Zuletzt bearbeitet von Hobby-Programmierer am Do 13.07.06 23:06, insgesamt 2-mal bearbeitet
del1312 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 190



BeitragVerfasst: Di 11.07.06 14:26 
Hi Hobby-Programmierer,

danke für deinen Tipp und dem Code. Jetzt klappt alles, hab recht herzlichen Danke :D

Liebe Grüße
ecspooky