Here's a way to do it...
Dim castControl As Windows.Forms.Control
Dim objButton As New Button
For Each castControl In yourFormHere.Controls
If castControl.GetType.Equals(objButton.GetType) Then
castControl.Enabled = False
End If
Next
Dunno about the emails thing.
"Sebastian Santacroce" <ss*********@ilogic.com> wrote in message
news:0c****************************@phx.gbl...
Is there some easy programmable way of traversing all
button in a form and set their enabled state to false?
Something like
for each button x in this.form
x.enabled=false
end for
Thank you
PS Why doesn't this newsgroup email me anymore when I get
a response to my post?
Sebastian