With Tables("数据表")
If .Current IsNot Nothing And .Current.locked=True Then
.Current.Locked = False
For Each c As WinForm.Control In e.Form.Controls("Panel1")
If Typeof c Is WinForm.TextBox Then '判断控件是否是文本框
Dim t As WinForm.TextBox = c '使用特定类型的变量引用控件
t.BackColor = color.white
ElseIf Typeof c Is WinForm.Datetimepicker Then '判断控件是否是文本框
Dim da As winform.Datetimepicker=c
da.BackColor = color.white
End If
Next
End If
End With
大神,请问为什么不能遍历某个控件中的控件呢? 有什么解决办法吗?
[此贴子已经被作者于2020/3/10 17:58:26编辑过]