带有关闭按钮的气球工具提示 - C#

发布于 2024-08-24 20:18:16 字数 254 浏览 3 评论 0原文

如何创建带有关闭按钮的气球工具提示。

我可以显示工具提示:

TaskbarIcon.ShowBalloonTip(10000);

但我不能做相反的事情:

TaskbarIcon.CloseBalloonTip();

甚至无法在气球提示上显示关闭框。

我在另一个网站上看到这个问题,但没有(免费)答案。

提前致谢

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

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

简单气质女生网名 2024-08-31 20:18:16

我找到了一个简单的答案。 我可以使用

TaskbarIcon.ShowBalloonTip(10000); 

此函数的第二种形式:

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

这实际上向气球提示添加了一个关闭框!

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!

待"谢繁草 2024-08-31 20:18:16

您可能会发现这很有趣:

http://www.tooltips.net/

这个问题对关闭气球有一个有用的答案。

除非您需要在关闭时挂钩事件,否则不需要气球上的按钮,即使需要,您也可以挂钩气球的单击事件来完成相同的事情。

有些标志允许您执行一些操作,例如在气球的右上角放置一个 X,以便用户可以将其关闭。请参阅此处了解更多信息:

http://msdn.microsoft.com/en-我们/杂志/cc188923.aspx

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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文