开发者

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开发者_Go百科 Balloon Tip.

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

Thanks in advance


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!


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜