Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   GUI-Design mit VCL / FireMonkey / Common Controls (https://www.delphipraxis.net/18-gui-design-mit-vcl-firemonkey-common-controls/)
-   -   Delphi Baloon-Hint im TrayIcon (https://www.delphipraxis.net/110731-baloon-hint-im-trayicon.html)

k4ni 23. Mär 2008 17:56


Baloon-Hint im TrayIcon
 
Hey,

Also ich versuche gerade mit einem Hint komponenten ein Baloon-Hint auf ein Tray-Icon zu machen bzw. anzeigen zu lassen.
Also in etwa so wie da:
http://www.delphipraxis.net/internal...ht=ballon+tray

Also so ruft man den hint normalerweise auf:
Delphi-Quellcode:
        Hint.ShowTextHintBalloon(bmtInfo, 'How is the test?',
      'WHOA! Am i looking frightnng for you? :)',
      300, 10, 10, self, TALHintBalloonArrowPosition(1));
Also self ist so zu sagen das "handle". Ich könnte da jetzt auch Button1 oder so rein machen.
So nun will ich das aber auf mein TrayIcon klatschen, nur bekomm das nicht hin.
Der Hint will ein TControl als handle.

Hier zeig ich euch mal wie ich das TrayIcon erstell:
Delphi-Quellcode:
  ...
WM_ICONTRAY = WM_USER + 1; // bei mir global
TrayIconData: TNotifyIconData; // auch global

procedure TForm1.FormCreate(...)
begin
  with TrayIconData do
  begin
    cbSize := SizeOf(TrayIconData);
    Wnd := Handle;
    uID := 0;
    uFlags := NIF_MESSAGE + NIF_ICON + NIF_TIP;
    uCallbackMessage := WM_ICONTRAY;
    hIcon := Application.Icon.Handle;
    StrPCopy(szTip, Application.Title);

      ShowWindow( Application.Handle, SW_HIDE );
  SetWindowLong( Application.Handle, GWL_EXSTYLE,
                 GetWindowLong(Application.Handle, GWL_EXSTYLE) or
                 WS_EX_TOOLWINDOW and not WS_EX_APPWINDOW);
  ShowWindow( Application.Handle, SW_SHOW );
  end;

  Shell_NotifyIcon(NIM_ADD, @TrayIconData);
...
end;
Nun wenn ich aber WM_ICONTRAY oder TrayIconData als TControl-handle beim Hint component benütze geht es natürlich nicht.
Irgend ne idee wie ich das machen könnte?

Fussball-Robby 23. Mär 2008 18:50

Re: Baloon-Hint im TrayIcon
 
Ich weiß zwar keine Lösung für dein Problem, aber ich kann dir nur die Komponente CoolTrayIcon empfehlen (kostenlos). Damit ist es ganz einfach, Balloontips, Hints etc. darzustellen. Ein Klick genügt :wink:

Mfg

RavenIV 25. Mär 2008 08:29

Re: Baloon-Hint im TrayIcon
 
Zitat:

Zitat von Fussball-Robby
Ich weiß zwar keine Lösung für dein Problem, aber ich kann dir nur die Komponente CoolTrayIcon empfehlen (kostenlos). Damit ist es ganz einfach, Balloontips, Hints etc. darzustellen. Ein Klick genügt :wink:

Mfg

Dem kann ich nur beisteuern.
Wenn ich ein Programm mit TrayIcon erstelle, verwende ich nur CoolTrayIcon.
Damit klappt alles zu meiner Zufriedenheit.


Alle Zeitangaben in WEZ +1. Es ist jetzt 10:35 Uhr.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz