Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Possible to move the mouse cursor to text cursor positio
Message
De
31/10/2001 14:38:59
 
 
À
31/10/2001 13:44:56
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Divers
Thread ID:
00575779
Message ID:
00575808
Vues:
32
Cetin,

I have studied your reply and I still remain clueless. I must be suffering from a major case of the 'stupids' today because you, Ed, and George have all posted what seem to be very matter of fact answers that for some reason just don't click with me.

Here's my scenario: I have an edit box with lots of text. The user has paged down several pages worth of content in the edit box and is in the midst of editing their text. For example, their text cursor may currently be located 48 pixels down and 120 pixels to the right of the control's origin. I would like to determine where the user's text cursor is (relative to the current control, form or screen) so I can popup a 'smart tag' like window relative to their current text cursor position, i.e. up and to the right of the current text cursor position similar to how one might position a context menu via a right mouse click.

I understand that _Screen.ActiveControl will tell me which control is active. I don't understand how I can use this information to synchronize my text cursor and mouse cursor so that they point at the same position on the screen.

I understand that ObjToClient() will convert a control's position to coordinates relative to its form vs. container. Using this I can determine where my edit control is on a form. But I don't see a way for ObjToClient() DRILL DOWN INTO a control to determine the coordinates of the control's text cursor.

I think(?) what I'm looking for is a way to use the 'mouse' command to move the mouse to a control's current text cursor position. Then I can query moues coordinates to determine the exact coordinates of a control's text cursor.

Thank you for your help and patience.

Regards,
Malcolm


>>Is there a way to move the mouse cursor to the position of a control's (textbox, editbox, combobox) text cursor so that both the text cursor and mouse cursor point to the same location on the screen?
>>
>>My motivation is that this technique would allow me to grab the location of a control's text cursor by retrieving the mouse's current coordinates.
>>
>>Thanks!
>>Malcolm
>
>Malcolm,
>Activecontrol would return you where text cursor (object) is and selstart position within cursor. You could also get form coordinates using ObjToClient()
>Cetin
Malcolm Greene
Brooks-Durham
mgreene@bdurham.com
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform