hey - no need to appologize! i am glad you could help me. this behavior was very confusing as i think its good gui to have the caret at the mouse click, even if its the right button. i am suprized that it didn't.
hope you got your confision straightened out.
thanks again!
>You're welcome Gunnar :)
>
>Sorry about yesterday. I was in the middle of "confusion", thinking which MSDN subscription should I get. So I was not in the mood to do some coding <*g&d*>
>
>Regards
>
>>Hello Herman
>>
>>Thank you much - works like a charm. i have now clue how i came up with so many lines of code - and then it didn't even work <vbg>.
>>
>>thank you again for your help!
>>
>>
>>>Hi Gunnar,
>>>
>>>I had converted my code to VFP code. Just a few lines of code *bg*. Modify the foolowing code according to your needs
>>>
>>>Declare Long GetCursorPos in User32 String @cPoint
>>>Declare Long ScreenToClient in User32 Long hWnd, String @cPoint
>>>
>>>Declare Long SendMessage in User32 as SendMessageStr ;
>>> Long hWnd, Long uMsg, Long wParam, String @lParam
>>>
>>>lc_Point = space(8)
>>>GetCursorPos( @lc_Point )
>>>ScreenToClient( ThisForm.RichEdit.hWnd, @lc_Point )
>>>ThisForm.RichEdit.SelStart = SendMessageStr( ThisForm.RichEdit.hWnd, EM_CHARFROMPOS, 0, lc_Point )
>>>
>>>
>>>HTH