1,451
社区成员
发帖
与我相关
我的任务
分享
Dim obj As Object
For Each obj In UserControl.ParentControls
Debug.Print obj.Name, TypeName(obj)
Next
public class usercontrol11
private sub button1_click(......)
for each thiscontrol as system.windows.forms.control in me.parent.controls
if thiscontrol.gettype.name ="TextBox" then
thiscontrol.text = "hello"
end if
next
end ub
end class