以文本方式查看主题

-  Foxtable(狐表)  (http://www.foxtable.com/bbs/index.asp)
--  专家坐堂  (http://www.foxtable.com/bbs/list.asp?boardid=2)
----  遍历textbox控件  (http://www.foxtable.com/bbs/dispbbs.asp?boardid=2&id=49153)

--  作者:lxhmax
--  发布时间:2014/4/12 21:07:00
--  遍历textbox控件
请问各位老师,

   遍历一个窗口所有的textbox控件,如果有空的textbox,不管有几个都只返回第一个空值的textbox的名称
   这样的代码要怎么写??

--  作者:lsy
--  发布时间:2014/4/13 7:39:00
--  
For Each c As WinForm.Control In e.Form.Controls
    If c.Gettype.Name = "TextBox" AndAlso e.Form.Controls(c.Name).Text = "" Then
        MessageBox.Show(c.Name)
        Exit For
    End If
Next