Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Balloon tooltip with close button - C#

How do I create a ballon tool tip with a close button.

I can show a tooltip:

TaskbarIcon.ShowBalloonTip(10000);

but I can't do the opposite:

TaskbarIcon.CloseBalloonTip();

Or even a way to show a close box on a Balloon Tip.

I saw this question posted on another site but with no (free) answer.

Thanks in advance

like image 970
Greycrow Avatar asked Mar 10 '10 22:03

Greycrow


2 Answers

I was able to find a simple answer. Instead of using:

TaskbarIcon.ShowBalloonTip(10000); 

I could use the second form of this function:

TaskbarIcon.ShowBalloonTip(10000,"Title","Message",ToolTipIcon.None); 

This actually adds a close box to the balloon tip!

like image 59
Greycrow Avatar answered Nov 12 '22 07:11

Greycrow


You might find this interesting:

http://www.tooltips.net/

This question has a helpful answer on closing the balloon.

Unless you need to hook an event on close, you don't need a button on the balloon, and even if you do, you can hook the balloon's click event to accomplish the same thing.

There are flags that allow you to do things like put an X in the upper right hand corner of the balloon so that the user can dismiss it. See here for more info:

http://msdn.microsoft.com/en-us/magazine/cc188923.aspx

like image 43
Robert Harvey Avatar answered Nov 12 '22 05:11

Robert Harvey