There sure is. What you do is make use of a combination of the TextBox'
SelectionStart and SelectionLength methods. By the way, I assume you mean
the caret when you talk about the cursor. The cursor is typically the arrow
"connected" to the mouse, the caret is the blinking vertical line where the
next character will be input. Here is a little sample setting the position
of the caret to 5 within an edit control as soon as we receive focus.
private void textBox1_GotFocus(object sender, System.EventArgs e)
{
textBox1.SelectionStart = 5;
textBox1.SelectionLength = 0;
}
Regards,
Maarten Struys
PTS Software bv
"Franz Holzhauser" <franz_ho...@hotmail.com> wrote in message
news:017f01c2cc38$05a99570$8af82ecf@TK2MSFTNGXA03...