دوست عزیز اینجا میتونید از روش زیر استفاده کنید:
دوست عزیز این کد رو توی Form Load با توی یک Button بزار
Dim TB az New textBox
For I as integer = 1 to 5
TB.name = "textbox" & i
Tb.Backcolor=Color.White
if i = 1 then
Tb.loacation = new point(10,10)
else
Tb.loacation = new point(10,(I*10) + (i*Tb.height))
end if
AddHandler Tb.Enter, AddressOf Textbox_Enter
AddHandler Tb.Leave, AddressOf Textbox_Leave
me.Controls.add(tb)
next
این هم مابقی کدهای مورد نیاز
Private Sub Textbox_Enter(byval Sender as object,ByVal e As System.EventArgs)
DirectCast(sender, TextBox).BackColor = Color.FromArgb(255, 255, 192)
end Sub
Private Sub Textbox_Leave(byval Sender as object,ByVal e As System.EventArgs)
DirectCast(sender, TextBox).BackColor = Color.White
end Sub