
Signature
Arne Garvander
Certified Geek
Professional Data Dude
You need to change the selection within the textbox. This is done with the
SelectionStart and SelectionLength properties. The start is the start
position for selection, the length is the number of characters to be
selected from that point or zero for no selection, just your flashing
cursor. For example, the following code moves the cursor to just after the
fifth character in the textbox.
textBox1.SelectionStart = 5;
textBox1.SelectionLength = 0;

Signature
BlackWasp
www.blackwasp.co.uk
>I use
> Mytextbox.text = "Default"
> mytextbox.focus
>
> How do I focus on the first character in the text box?
Herfried K. Wagner [MVP] - 26 Jan 2008 18:51 GMT
"BlackWasp" <nospam@please> schrieb:
> You need to change the selection within the textbox. This is done with
> the SelectionStart and SelectionLength properties.
... or via the control's parameterized 'Select' method.

Signature
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>
BlackWasp - 26 Jan 2008 21:25 GMT
Good point! :-)
I happened to be working on a form where I was reading the selection
position from a textbox at the time. I guess it was in mind!

Signature
BlackWasp
www.blackwasp.co.uk
> "BlackWasp" <nospam@please> schrieb:
>> You need to change the selection within the textbox. This is done with
>> the SelectionStart and SelectionLength properties.
>
> ... or via the control's parameterized 'Select' method.