03-04-19, 06:30 PM
يوجد اختصار وهذا هو الكود
For Each pg As TabPage In TabControl1.TabPages
For Each tb As TextBox In pg.Controls.OfType(Of TextBox)()
If String.IsNullOrEmpty(tb.Text.Trim) Then
tb.BackColor = Color.Red
Else
tb.BackColor = Color.White
End If
Next
Next
For Each pg As TabPage In TabControl1.TabPages
For Each tb As TextBox In pg.Controls.OfType(Of TextBox)()
If String.IsNullOrEmpty(tb.Text.Trim) Then
tb.BackColor = Color.Red
Else
tb.BackColor = Color.White
End If
Next
Next
