Ver Mensaje Individual
  #9 (permalink)  
Antiguo 06/10/2004, 10:09
Avatar de RootK
RootK
Moderador
 
Fecha de Ingreso: febrero-2002
Ubicación: México D.F
Mensajes: 8.004
Antigüedad: 22 años, 3 meses
Puntos: 50
Entonces te quedaría así:

Cita:
For Each c As Control In Controls
Dim sName As String = c.GetType().Name
If sName = "ComboBox" Then
CType(c, ComboBox).Enabled = False
End If
If sName = "TextBox" Then
CType(c, TextBox).Enabled = False
End If
Next
Por el simple hecho de estar deshabilitados te apareceran en color gris.

Salu2