Hi Tariq,
1) See at property
SelStart,
SelLength and
SelText in Help
2)
IF TYPE("Thisform.ActiveControl")="O" AND !ISNULL(Thisform.ActiveControl)
?"Has focus",SYS(1272,Thisform.ActiveControl)
ENDIF
MartinJ
>Dear Experts
>
>I am using VFP6.
>How to check if the cursor is in textbox1?
>or how to check which control on form has recently got focus?
>
>Please help