I'd like to change the background color of each textbox on my form to a
different color when entered. The code below doesn't work (invalid cast
error) but you should be able to get the gist of what I want to do. Any
help is appreciated. Thanks.
Private Sub txtHubMnemonic_Enter(ByVal sender As Object, ByVal e As
System.EventArgs) Handles txtHubMnemonic.Enter
'SetBackColor(sender)
SetBackColor(txtHubMnemonic)
End Sub
Private Sub SetBackColor(ByRef MyTB As TextBox)
For Each TB As TextBox In Me.Controls
TB.BackColor = System.Drawing.Color.White
Next
MyTB.BackColor = System.Drawing.Color.BlanchedAlmond
End Sub
*** Sent via Developersdex http://www.developersdex.com ***