如何显示消息框? [英] How to show message box?
本文介绍了如何显示消息框?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
你好,
我想显示带有小图标的消息框,即信息框.
请帮帮我.
从OP更新:
MessageBoxIcon.Information(MessageBox.Show("Record save Successfully"));
Hello,
I want to show message box with the icon small, i.e. information box.
Please help me.
UPDATE from OP:
MessageBoxIcon.Information(MessageBox.Show("Record save Successfully"));
It is not working, please suggest.
推荐答案
是这样吗?
消息框 [
Is it something like this?
MessageBox[^]
Solution as others have suggested:
MessageBox.Show("Record save Successfully!!", "Record saved", MessageBoxButtons.OK, MessageBoxIcon.Information);
您可以通过多种方式组合MessageBox.Show
.
也许一种方法应该是显示一个消息框,并询问您他是否继续编辑当前记录?
You can combine MessageBox.Show
in many ways.
Perhaps one way should be to show a message box and ask you if he whats to continue to edit current record?
DialogResult result = MessageBox.Show("Record save Successfully!!" + Environment.NewLine + "Continue edit current record?",
"Record saved",
MessageBoxButtons.YesNo,
MessageBoxIcon.Question,
MessageBoxDefaultButton.Button2);
// Default button for MessageBox is Button2 = No.
// If user press enter when the MessageBox is showing. User will select "No".
if (result == DialogResult.No)
{
Close(); // Close form
}
尝试一下
Try this
MessageBox.Show("Record save Successfully!!", messageBox title, MessageBoxButtons.OK, MessageBoxIcon.Information);
suvaaj,
我认为这是您需要的功能:
Hi suvaaj,
I think this is the function you need :
MessageBox.Show("Record save Successfully!!", "Saved", MessageBoxButtons.OK, MessageBoxIcon.Information);
希望对您有所帮助,
:)
I hope this help,
:)
这篇关于如何显示消息框?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文