Hola....
tengo esto en mi Form load para condicionar el backcolor de un textbox:
If TextBox1.Text = 0 Then
Else
TextBox1.BackColor = Color.LightGreen
End If
Preo como le haria para condicionar 60 textbox a la vez?
Gracias por prestar atencion.
Hola....
tengo esto en mi Form load para condicionar el backcolor de un textbox:
If TextBox1.Text = 0 Then
Else
TextBox1.BackColor = Color.LightGreen
End If
Preo como le haria para condicionar 60 textbox a la vez?
Gracias por prestar atencion.
Estoy intentando con:
'For Each TextBox As Control In Me.Controls
'If TypeOf TextBox Is TextBox Then
'If TextBox.Text > 0 Then
'TextBox.BackColor = Color.LightGreen
'Else
'End If
'End If
'Next
Pero no logro hacer que cambie de color el backcolor del textbox en el form load.
Saludos:
Seria algo asi:
Espero ayude.Código:For Each Cntrl As Control In Me.Controls If TypeOf (Cntrl) Is TextBox Then Dim MyTextB As TextBox = DirectCast(Cntrl, TextBox) With MyTextB If .Text.Length > 0 Then .BackColor = Color.LightGreen End If End With End If Next
JOSE LUIS
Exodo 20:1-17 ----> Dios NO los llamo LAS DIEZ RECOMENDACIONES.