Results 1 to 7 of 7

Thread: lostfocus in vb7

  1. #1

    Thread Starter
    Lively Member Edilson's Avatar
    Join Date
    Aug 2000
    Location
    Orlando
    Posts
    81

    lostfocus in vb7

    sorry guys for this question!
    But , how do i know when a texbox lost focus.

    like in vb6 :
    Private Sub TextSKU_LostFocus(Index As Integer).

  2. #2
    Sleep mode
    Join Date
    Aug 2002
    Location
    RUH
    Posts
    8,083

    Re: lostfocus in vb7

    Originally posted by Edilson
    sorry guys for this question!
    But , how do i know when a texbox lost focus.

    like in vb6 :
    Private Sub TextSKU_LostFocus(Index As Integer).
    try this in a commandbutton
    VB Code:
    1. If TextBox1.Focus = False Then
    2.             MsgBox("lost")
    3.         Else
    4.             MsgBox("got focus")
    5.         End If

  3. #3

    Thread Starter
    Lively Member Edilson's Avatar
    Join Date
    Aug 2000
    Location
    Orlando
    Posts
    81
    this is not an event.
    i need to control when the user left the textbox.

  4. #4
    Sleep mode
    Join Date
    Aug 2002
    Location
    RUH
    Posts
    8,083
    Originally posted by Edilson
    this is not an event.
    i need to control when the user left the textbox.
    VB Code:
    1. Private Sub TextBox1_Leave(ByVal sender As Object, ByVal e As System.EventArgs) Handles TextBox1.Leave
    2.  
    3.  
    4. End Sub
    this is lostfoucs event of a textbox

  5. #5

    Thread Starter
    Lively Member Edilson's Avatar
    Join Date
    Aug 2000
    Location
    Orlando
    Posts
    81
    thank you !!!

    Do i have to insert manually this sub or vb7 does it for me like in vb6 ???

  6. #6
    Sleep mode
    Join Date
    Aug 2002
    Location
    RUH
    Posts
    8,083
    Originally posted by Edilson
    thank you !!!

    Do i have to insert manually this sub or vb7 does it for me like in vb6 ???
    nope . It is ready in "Method Name" Combobox on the right side.

  7. #7

    Thread Starter
    Lively Member Edilson's Avatar
    Join Date
    Aug 2000
    Location
    Orlando
    Posts
    81

    Talking

    thank you very much !!!!!!!!!

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