if(textBox1.Text == "") {
MessageBox.Show("You must enter a name.", "Name Entry Error",
MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
}
else {
// Code to act on the data entered would go here.
}
MessageBox.Show("You must enter a name.", "Name Entry Error",
MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
}
else {
// Code to act on the data entered would go here.
}
解决方案 »
- 懂java和C#的一起看啊
- 我用mouseclick触发一个画图事件,为何单击后图片只闪了一下
- 怎样用程序判断两张图片是否相同?
- 关于combobox 下拉列表 显示数据库中的指定列
- 查询值的数目与目标字段中的数目不同。
- 在 winform 中,通过按钮新增加 pictureBox,发现新增加的 pictureBox 总是在原来的下面,如何能放到上面?
- WinForm DataGrid的问题?
- 求教:在C#中如何探测SqlServer 里有数据库啊?
- 劳动法是用来干什么的 -> 保证老板只支付8小时工资 工会是派什么用的 -> 是在追悼会上代表党 代表人民 给你读悼词的
- 帮忙看一下,是页面传值的问题吗?
- 为什么Visual C#编程精彩百例一书中2-1 2-2 3-1在VS.NET下不能编译?
- !!!请问大家一个小问题???
using System.Windows.Forms;
就可以了。这段代码是MSDN中的,总不会有错吧。
MsgBox("Hello")[C#]
System.Windows.Forms.MessageBox.Show("Hello");