Results 1 to 3 of 3

Thread: Got focus not getting triggered always!

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Nov 1999
    Posts
    17

    Post

    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.


  2. #2
    Member
    Join Date
    Jan 1999
    Location
    Garden Grove, CA, Orange
    Posts
    55

    Post

    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

  3. #3
    Member
    Join Date
    Jan 2000
    Location
    Singapore
    Posts
    59

    Post

    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width