本帖最后由 dodonight 于 2010-12-16 16:33:53 编辑

解决方案 »

  1.   

    用 validate 控件 验证不能为空其实 没必要  不填就错了呗
      

  2.   

    你在Button事件里面判断啊!如果texbox为空的时候就弹出消息呗!用JS也行啊!
      

  3.   

                if ((textBox1.Text == null) || (textBox1.Text == ""))
                {
                    tag = false;
                    MessageBox.Show("问题1不允许为空");
                }前面的击中radioButton的代码如何编写呢?
      

  4.   

    winForm 直接给radioButton5 private void radioButton1_CheckedChanged(object sender, EventArgs e)事件里面写
     this.textBox1.Focus();就行了呀!
      

  5.   

    哦 刚才少看到最后一句。汗。 就按 上面那个写的做就好了radioButton5 private void radioButton1_CheckedChanged(object sender, EventArgs e)

        this.textBox1.Focus();

      

  6.   

    解决了 在上面if (radioButton5.Checked )加多个IF字段