Results 1 to 4 of 4

Thread: Get the position of the caret again

  1. #1

    Thread Starter
    Lively Member Yok's Avatar
    Join Date
    Feb 2001
    Location
    Guangzhou,China
    Posts
    72

    Get the position of the caret again

    How can I get the position of the caret?I want to made my application has a feature like VB's Intellisense.
    I want to get it's coordinate,not the amount of charators !

  2. #2
    Fanatic Member
    Join Date
    Sep 2000
    Location
    UK.
    Posts
    728

    API functions.

    Look into the GetCursorPos and the TrackMouseEvent API functions...

    Hope this helps.
    Laterz
    Digital-X-Treme
    Contact me on MSN Messenger: [email protected]

    [VBCODE]Debug.Print Round(((1097) - ((55 ^ 5 + 311 ^ 3 - 11 ^ 3) _
    / (68 ^ 5))) ^ (1 / 7), 13)[/VBCODE]

  3. #3

    Thread Starter
    Lively Member Yok's Avatar
    Join Date
    Feb 2001
    Location
    Guangzhou,China
    Posts
    72
    But I mean I want to get the position of the caret in a textbox,not the position of the mouse coursor.

  4. #4
    Matthew Gates
    Guest
    Use the GetCaretPos API function.


    VB Code:
    1. Private Declare Function GetCaretPos Lib "user32" _
    2. Alias "GetCaretPos" (lpPoint As POINTAPI) As Long
    3.  
    4. Private Type POINTAPI
    5.     x As Long
    6.     y As Long
    7. End Type

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