遍历所有窗体控件

来源:互联网 发布:excel中工龄的算法 编辑:程序博客网 时间:2024/05/18 10:08
遍历所有窗体控件
 For Each Control In GroupBox2.Controls
            If TypeOf Control Is TextBox Then
                If Control.ForeColor = Color .Red Then
                    MessageBox.Show("还有错误,不允许提交!请检查后,再提交!" , "Warning", MessageBoxButtons.OK, MessageBoxIcon .Warning)
                    Exit For
                End If
            End If
        Next
原创粉丝点击