Mohammed Ahmed Gouda wrote:
how can i make the cursor return to the beginning of text box
TextBox1.SelectionStart = 0;
From your code in comment, I would say, don't change the text in TextChanged event, or remove handler before changing.
textBox1.TextChanged -= textBox1_TextChanged;
textBox1.Text=textBox1.Text.Remove(0, 7);
textBox1.TextChanged += textBox1_TextChanged;