C#中的消息框仅适用于“警报"目的? [英] Message Box in C# only for "Alert" purpose?

查看:66
本文介绍了C#中的消息框仅适用于“警报"目的?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我想在消息框(或任何其他类似的UI组件)中向用户显示一些信息.问题是,当我使用消息框时,我的过程等待用户单击确定"以继续其代码流.我不希望我的过程等待用户单击确定"以继续执行.
我的消息框如下:
MessageBox.show("info");

请让我知道可以用来向用户显示信息的UI组件吗?我对C#很陌生...

在此致谢!

Hi,

I want to display some information to the user in a message box(or any other similar UI component) The problem is that when I use a message box my process waits for the user to click on OK to proceed its code flow. I do not want my process to wait for the user to click on OK to continue it''s execution.
My message box is as below:
MessageBox.show("info");

Please let me know what UI component I can use to just display information to the user? I am pretty new to C#...

Regards and Thanks in advance!

推荐答案

在这种情况下,我想使用StatusStrip
In situations like this I like to use the StatusStrip to show information to users[^].

It does have the limitation that there is limited space available but is otherwise very useful.


如何使用
How about using the Notify Icon[^]

That will create an icon in the System Tray, you can then show info balloon messages


我只需要使用标签来显示信息并继续操作即可.

I would simply use a label to display the information and continue with the flow.

informationlabel.Text = "I have some information for you!";


这篇关于C#中的消息框仅适用于“警报"目的?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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