Private Sub Command1_Click()
Dim p As Control
For Each p In Me.Controls
If TypeOf p Is PictureBox Then p.Visible = False
Next
Me.Controls("panel").Visible = True
End Sub
Dim x As Control
Dim y As frmTest
For Each x In y
If TypeOf x Is PictureBox And x.Name = "" Then
x.Visible = True
ElseIf TypeOf x Is PictureBox And x.Name <> "" Then
.Visible = False
End If
Next x
你试试