本文介绍了如何循环tabcontrol1或tabpage中的所有控件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
For Each cControl In Me.Controls
If (TypeOf cControl Is TextBox) Then
End If
If (TypeOf cControl Is CheckBox) Then
End If
If (TypeOf cControl Is ComboBox) Then
End If
If (TypeOf cControl Is RadioButton) Then
End If
next cControl
我尝试了什么:
尽我所能努力提高质量但是?
What I have tried:
tryed me best effort to make a quality but ?
推荐答案
public sub WalkControls(TopControl as Control)
For Each x As Control In TopControl.Controls
If x.HasChildren Then
WalkControls(x)
Else
'
' Do what you want to do with the control
'
End If
Next
End sub
这篇关于如何循环tabcontrol1或tabpage中的所有控件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!