Discussion Locked

ActiveX Programming

0 helpful
1 reply
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.
Respected Programmers i m in trouble to create a custom text box in vb6 that change it colors on got focus and lost focus these properties are set during design time

1 reply

by juergen hartl

You do NOT have to create a new Control.
Just change the BackColor on GotFocus and LostFocus events.

Private Sub Text1_GotFocus()
Text1.BackColor = &H8080FF
End Sub

Private Sub Text1_LostFocus()
Text1.BackColor = &H0
End Sub

This discussion is closed to new replies.