Panel2 of a SplitContainer (spcBody) may or may not contain controls that are visible. Under certain conditions I want all controls to be invisible. I wrote following piece of code:
The red statement is however flagged with an error: Option Strict On disallows late binding
What is the correct statement to perform the task?
_________________________________
In theory, there is no difference between theory and practice. In practice, there is. [attributed to Yogi Berra]
Code:
[COLOR=green]'if there are controls on the panel to the right of the splittercontrol,
'then hide them[/color]
Select Case Me.spcBody.Panel2.Controls.Count > 0
Case True
For Each ctrl In Me.spcBody.Panel2.Controls
[COLOR=red]ctrl.visible = False[/color]
Next
Case False
[COLOR=green]'do nothing[/color]
End Select
The red statement is however flagged with an error: Option Strict On disallows late binding
What is the correct statement to perform the task?
_________________________________
In theory, there is no difference between theory and practice. In practice, there is. [attributed to Yogi Berra]