【发布时间】:2015-07-15 15:33:25
【问题描述】:
在 VS2013 VB 中工作,我有一个 TabControl,它在各种选项卡上都有 Button 控件,名为 Button1、Button2 等。我想在表单加载期间将所有按钮的 visible 属性设置为 false,但是它是不工作。我确定我遗漏了一些简单的东西,这是我的代码:
Dim ctl As Control
'Loop thru all controls
For Each ctl In Me.Controls
'Test that it is a Button and test for name
If (TypeOf ctl Is Button And Mid(ctl.Name, 1, 6) = "Button") Then
'Hide the Button
ctl.Visible = False
End If
Next
【问题讨论】:
标签: vb.net tabcontrol