To highlight the text I am doing maskedTextBox.SelectAll() for the events of "Enter" and "MouseDown" and it is working when I using the Mouse but I go to that text box by pressing the TAB key, it does not work
what Am I missing in here?
To highlight the text I am doing maskedTextBox.SelectAll() for the events of "Enter" and "MouseDown" and it is working when I using the Mouse but I go to that text box by pressing the TAB key, it does not work
what Am I missing in here?
Have you tried the GotFocus
event?
When you change the focus by using the keyboard (TAB, SHIFT+TAB, and so on), by calling the Select or SelectNextControl methods, or by setting the ContainerControl.ActiveControl property to the current form, focus events occur in the following order:
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.