Public Function IsExists(ByVal frmTestText As Windows.Forms.Form) As Boolean
IsExists = True
Dim c As Control
For Each c In frmTestText.Controls
If TypeOf c Is TextBox Then
c.Text = c.Text.Trim
If c.Text = "" Then
IsExists = False
c.Focus()
Exit Function
End If
End If
Next
End Function
原文地址:http://blog.csdn.net/hzl9966/article/details/43850739