日期:2014-05-17 浏览次数:20838 次
foreach (System.Windows.Forms.Control ctr in this.Controls)
{
if (ctr is GroupBox)
{
foreach (Control ctr1 in ctr.Controls)
{
if (ctr1.Text.Length <= 0 && ctr1 is TextBox && !ctr1.Name.ToString().EndsWith("Dataname"))
{
toolStripStatusLabel1.Text = "請輸入" + ctr1.Name.ToString();
ctr1.Enabled = true;
break;
}
}
}
}
foreach (Control control in tabPage1.Controls)
{
if (control.Text.Length <= 0 && control is TextBox && !control.Name.ToString().EndsWith("Dataname"))
{
toolStripStatusLabel1.Text = "請輸入" + control.Name.ToString();
control.Enabled = true;
&nbs