How do you determine the cursor's current position in a textbox?
Printable View
How do you determine the cursor's current position in a textbox?
You use the SelectionStart and SelectionLength properties. If no text is selected then SelectionLength will be zero.
Thanks. I thought I had read somewhere that this (and similar properties) wasn't available in .NET--that it was from VB6. I was wrong...
Had you looked at the member listing for the TextBox class in the MSDN library you would have seen otherwise.
I refer to you to here.
And I strongly disagree and reiterate that to assume it's too hard and not bother is a good way to never get better.