I am using maskedTextBox.SelectAll()
to highlight the text in the MaskedTextBox in the Enter
and MouseDown
events.
It works when I use the mouse, but I go to that textbox by pressing the Tab key, it does not work.
What am I missing here?
I am using maskedTextBox.SelectAll()
to highlight the text in the MaskedTextBox in the Enter
and MouseDown
events.
It works when I use the mouse, but I go to that textbox by pressing the Tab key, it does not work.
What am I missing here?
Have you tried the
GotFocus
event?It then goes on to list the events that are fired. It looks like this fires when the mouse is used so you might only need this handler.