How do I detect where the cursor is in a text box, do an operation that ill change the contents of the box, then put the cursor back where it was before?
Printable View
How do I detect where the cursor is in a text box, do an operation that ill change the contents of the box, then put the cursor back where it was before?
Use the SelStart property.
Code:Retval = Text1.SelStart
'Do other code here
Text1.SelStart = Retval
Cool, thanks :)