【发布时间】:2011-09-06 13:32:11
【问题描述】:
private void frmSearch_Load(object sender, EventArgs e)
{
// TODO: This line of code loads data into the 'bookdatabaseDataSet.Dist_Year' table. You can move, or remove it, as needed.
this.dist_YearTableAdapter.Fill(this.bookdatabaseDataSet.Dist_Year);
// TODO: This line of code loads data into the 'bookdatabaseDataSet.Dist_Auth' table. You can move, or remove it, as needed.
this.dist_AuthTableAdapter.Fill(this.bookdatabaseDataSet.Dist_Auth);
// TODO: This line of code loads data into the 'bookdatabaseDataSet.Book' table. You can move, or remove it, as needed.
this.bookTableAdapter.Fill(this.bookdatabaseDataSet.Book);
}
private void button1_Click(object sender, EventArgs e)
{
Form f4 = new Confirm();
f4.Show();
Hide();
}
private void button2_Click(object sender, EventArgs e)
{
if (MessageBox.Show("Are you sure you want to Exit?", "Exit", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
{
Application.Exit();
}
}
我的问题是: 如果我没有选中任何复选框,我希望从表单中给我错误消息。它的正确代码是什么?我应该在哪里纠正它?非常感谢您的关心。 form of windows application
【问题讨论】:
-
C# 语言没有任何复选框。也许您正在谈论 Windows 窗体 CheckBox、ASP.NET CheckBox、WPF CheckBox、Silverlight CheckBox 或其他复选框?
-
是的,我说的是 Windows 窗体复选框!感谢您的关心! :)