Hallo Wilson,
first of all, your Code
with text1
if .selstart < alltrim(.len(.Value))
.selstart = 0
.sellength = len(.Value)
endif
endwith
can't work: the alltrim in the second line is not a numeric which could be compared to .selstart.
But, once again: it seems so, that the selstart is set AFTER the GotFocus event, and I need to know where was the MOUSEPOINTER as the user clicked on the textbox. .selstart has at that point of time NOTHING TO DO with the position of the MOUSEPOINTER
Regards