I'm looking something which allow me to set the cursor at the beginning of my MaskedTextBox.
I have a mask like this : '00 00 00 00 00'
When I enter into my field, my cursor isn't at begin. '00 0|0 00 00 00' instead of '|00 00 00 00 00'
I tried this code :
sender, EventArgs e)
((maskedTextBox1.Text.Trim()).Length == 0)
But it doesn't work.
I tried the same code on MouseUp Action but I need to select the control.
If I do a MouseUp inside MaskedTextBox nothing happend, but if I do a MouseUp on the border of my MaskedTextBox, it works. Why?
What should I do in order to set my cursor in the first position?
I tried maskedTextBox1.SelectionStart = 0; but doesn't work.