How to create an owner drawn tooltip for NotifyIcon?

K

kirk

I am trying to make a crafty tooltip, like the ones that popup when
you hover over the tray icons for Windows Vista, such as the "battery
meter", "network connectivity", "speaker volume" ...I am really
unhappy that NotifyIcon cannot be used with ToolTip.SetToolTip().

-- example --
myToolTip.SetToolTip(this.myNotifyIcon, "some tooltip text");

private void myToolTip_Draw(arg,arg)
{
// custom draw my tooltip here
// graphics, colored text, multiline
}


Any other ideas before I reluctantly resort to Windows message pump
event handling and littering my code with external API calls?
 
M

Moty Michaely

I am trying to make a crafty tooltip, like the ones that popup when
you hover over the tray icons for Windows Vista, such as the "battery
meter", "network connectivity", "speaker volume" ...I am really
unhappy that NotifyIcon cannot be used with ToolTip.SetToolTip().

-- example --
myToolTip.SetToolTip(this.myNotifyIcon, "some tooltip text");

private void myToolTip_Draw(arg,arg)
{
// custom draw my tooltip here
// graphics, colored text, multiline

}

Any other ideas before I reluctantly resort to Windows message pump
event handling and littering my code with external API calls?

Dear Kirk,

If you use the NotifyIcon class, set it's Text property. This will set
the ToolTip text that will be raised when hovering the notify icon.

Hope this helps,
Cheers,
Moty
 
M

Moty Michaely

Dear Kirk,

If you use the NotifyIcon class, set it's Text property. This will set
the ToolTip text that will be raised when hovering the notify icon.

Hope this helps,
Cheers,
Moty

Oops.

I now got what you asked for and my suggestion doesn't acquire it ;)

I am not familiar with .NET ways to achieve what you need.
Unfortunately WPF does not provide a notification icon implementation.

Moty
 
Top