PDA

Click to See Complete Forum and Search --> : Got focus not getting triggered always!


c_jeyasree
Jan 3rd, 2000, 02:36 PM
friends,

vb 6.0 is front end.

All the text fields have a different backcolor. When the focus comes to a text field, i change to the normal color( the code for which has bn written in gotfocus event). Certain fields remain colored with the focus on it.

Doevents in the lost focus of previous field did not help.

any suggestions?

friendly,
jey.

jpark
Jan 4th, 2000, 12:24 AM
Post part of ur code.

In one of my project, I have done same thing with no problem.

my code is like this

Private Sub txtCust_GotFocus(Index As Integer)
'** Change BackColor to white
txtCust(Index).BackColor = &HFFFFFF
'** Select all text on focus
SendKeys "{home}+{end}"
End Sub

Private Sub txtCust_LostFocus(Index As Integer)

'** Change BackColor to light gray
txtCust(Index).BackColor = &HE0E0E0
End Sub


Joon

karunakaran
Jan 4th, 2000, 03:51 PM
Hai

Some of my projects I used this way.I am changing it when it got the focus.

private sub text1_gotfocus()
text1.backcolor = vbred
end sub

I didn't get any problem.