0

How to set the cursor position of a MaskedTextBox in VB.NET start from right? MaskedTextBox in my form is 5 digit numeric format.

spajce
  • 7,044
  • 5
  • 29
  • 44
Thanzeem
  • 133
  • 5
  • 13
  • 22

2 Answers2

0

If I understand your question.

    MaskedTextBox1.Focus()
    MaskedTextBox1.SelectionStart = 5
spajce
  • 7,044
  • 5
  • 29
  • 44
0

Only this helped me:

private void TxtSeriesTxtNumber_EnterLeave(object sender, EventArgs e) {
            MaskedTextBox txt = sender as MaskedTextBox;
            if (txt.IsNull()) {
                return;
            }
            txt.Select(0, 0);
        }
Mic
  • 105
  • 1
  • 6