Results 1 to 4 of 4

Thread: Cursor Pos into TextBox

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    May 1999
    Location
    Reynosa, Mexico
    Posts
    274
    How can I know the position of the cursor into the TextBox?

  2. #2
    PowerPoster Fox's Avatar
    Join Date
    Jan 2000
    Location
    *afk*
    Posts
    2,088
    The MouseMove event of the TextBox returns the cursor coordinates relativr to it. If you want to get the absolute position you can use the GetCursorPos API function or add the position of the TextBox and every parent to the coordinates.
    Code:
    'Module
    Public Type tCoord2D
       x As Long
       y As Long
    End Type
    
    Public Declare Function GetCursorPos Lib "user32" Alias "GetCursorPos" (lpPoint As tCoord2D) As Long
    
    'Code
    Dim Temp as tCoord2D
    
    'Get position
    GetCursorPos Temp
    
    Caption = Temp.x & ", " & Temp.y

  3. #3

    Yeah...

    Yeah I Need To Know This So I Can Insert Text Where The Cursor Is At Please Email Me When Yall Figure It Out. <B>[email protected]<B>
    I Think I Might Dont Know The Answer To That One...

  4. #4

    I Found Out....

    I Found Out...
    You Could Use The SelStart Property, Or You Could Also see The SelTexr Property
    I Think I Might Dont Know The Answer To That One...

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