Windows窗体中的POPup气球消息 [英] POPup balloon messages in windows forms

查看:138
本文介绍了Windows窗体中的POPup气球消息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


我在网上进行了大量搜索,以找到一种在我的C#代码中显示弹出消息的方法,但失败了.如果有人可以帮助我,我将非常感谢他

我想展示的是这样的东西

Hi,
i have searched a lot on the web to find a way to show popup messages in my c# code but failed. if anybody here can help me i shall be very thankfull to him

what i want to show is something like this

if(x < y)
popup.show("y is greater than x", 500);



并且此弹出消息应在500毫秒后自动关闭.

谢谢大家的期待.



and this popup message should close automatically after 500 milliseconds.

Thanking u all in anticipation

推荐答案

您最好的选择可能是制作自己的小表格,该表格在X时间后会自动关闭.然后,您可以根据需要使其外观.

我认为框架中没有任何东西可以满足您的需求,最接近的东西是普通的ol''MessageBox,但我怀疑这样做看起来不错,而且我不认为那里有不带任何按钮的选项.

编辑:实际上,在经过快速检查之后,正如我所想,您可以选择在任意位置,任何时间显示工具提示,只需调用myToolTip.Show("some text", this, position, duration);
Your best option is probably to make your own little form that will automatically close itself after X amount of time. You can then make it look however you want.

I don''t think there''s anything in the framework that fits what you want, the closest thing is a regular ol'' MessageBox but I doubt that would look to good, and I don''t think there''s an option to have it without any buttons.

EDIT: Actually, after a quick check and as I thought, you can choose to show a ToolTip wherever and whenever you like, simply by calling myToolTip.Show("some text", this, position, duration);


它们称为工具提示. Google,您会找到所需的所有信息.
They are called tooltips. Google that and you''ll find all the info you need.


感谢您的回复.

实际上,我正在做的是,当我的程序启动时,我的程序窗体将转至后端,并且Windows的正常工作将继续进行.如果我的指针在主屏幕的某个x y位置停了2秒钟,弹出窗口应该会出现并显示该位置的x y坐标.

知道如何在主屏幕上使用工具提示吗?
Thanks for the reply.

Actually what i am doing is that when my program starts the my programs form goes to back end and the normal working of windows is carried on. If my pointer stop for 2 seconds at some x y position in primary screen the popup should come up and show the x y coordinates of that position.

Any idea how to use tool tip with primary screen??


这篇关于Windows窗体中的POPup气球消息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆