hi leute
ich wusste nicht genau wo das hingehört deswegen hab ichs in Sonstiges gemacht!
Ich hab ein Problem und zwar stört mich das SysTray Icon von meinem Programm, wenn ich es aber ändere ändert sich auch das von dem Programm an sich, jetzt hab ich aber bei der Form im Objektinspektor ein Zweites Icon ausgewählt das jetzt nur in der Titelleiste angezeigt wird, wie kann ich es machen das eben dieses Icon auch das SysTray Icon ist ?
Hier mal der Code:
Quelltext
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23:
| procedure TForm1.minimizeClick(Sender: TObject); begin //hide the form Form1.Visible := False; //give the application icon handle to blah blah := application.Icon.Handle; //Get The Size Of Byte Of TNotifyIconData Trayicon.cbSize := SizeOf(TNotifyIconData); //Say The Icon Is Coming From The Form Trayicon.Wnd := handle; //Give A Tip Message With Mouse Over Trayicon.szTip := 'Programm'; //Give It A Identifier of your icon Trayicon.uID := 1; //give the hicon to the tray icon TrayIcon.hIcon := blah; //my callback function so when click it does something TrayIcon.uCallbackMessage := WM_CAllBack; //TrayIcon flags to say what it can do Trayicon.uFlags := NIF_MESSAGE or NIF_ICON or NIF_TIP; //Add The Icon To The Tray Shell_NotifyIcon(NIM_ADD,@trayicon); end; |
danke!!
