Entwickler-Ecke

WinForms - ToolTip für NotifyIcon im System Tray?


Christoph1972 - So 18.10.09 21:27
Titel: ToolTip für NotifyIcon im System Tray?
Hallo zusammen,

die Aktivität meiner Anwendung wird mit einem NotifyIcon im SystemTray angezeigt. Nun möchte ich bei einem Event, ein Tooltip an der Position des NotifyIcons anzeigen. Dem Tooltip kann kein NotifyIcon als Control angehängt werden.

Hat jemand eine Idee, wie ich das realisieren könnte?


nico t. - Mi 21.10.09 10:06

Das NotifyIcon besitzt doch schon eine Art ToolTip. Warum nutzt du nicht die?


C#-Quelltext
1:
2:
3:
4:
5:
6:
7:
public void SampleEvent(EventArgs e)
{
     notifyIcon1.BalloonTipIcon = ToolTipIcon.Info;
     notifyIcon1.BalloonTipText = "Das ist der Tooltip";
     notifyIcon1.BalloonTipTitle = "Tooltip";
     notifyIcon1.ShowBalloonTip(50);
}


Gruß Nico


Christoph1972 - Mi 21.10.09 14:32

Hi,

vielen Dank! Ich habe die Member leider nicht gesehen :oops: Gut das ich noch keine Zeit gefunden habe, mein eigens ToolTip zu entwickeln. Das hatte ich schon eingeplant......