
28/03/2005, 13:40
|
 | | | Fecha de Ingreso: septiembre-2004 Ubicación: Venezuela
Mensajes: 300
Antigüedad: 20 años, 6 meses Puntos: 2 | |
Utiliza este sub, le mandas el panel y le indicas si lo quieres activar o desactivar.
Public Sub ShowPanel(ByRef panel As Panel, ByVal visible As Boolean)
Dim validator As IValidator
Dim ctrl As Control
For Each ctrl In panel.Controls
If TypeOf ctrl Is IValidator Then
validator = CType(ctrl, IValidator)
ctrl.Visible = visible
If Not visible Then
validator.Validate()
End If
End If
Next
panel.Visible = visible
End Sub
En tu caso:
ShowPanel(PanelConectando, True)
ShowPanel(PanelDatos, False)
Cualquier duda vuelve a preguntar.
I hope te funcione. Saludos... |