I have the need to disable multiple controls based on specific circumstances.
I thought about going at it like so.
Thing is, this doesn't work for ToolStrip items. Is there a way to do this without checking the type of each control passed to the function?Code:Public Shared Sub Disable(ByVal ParamArray ControlsToDisable As Control()) Try For Each c In ControlsToDisable c.Enabled = False Next Catch ex As Exception Err(ex) End Try End Sub




Reply With Quote