This seems like it ought to be a simple thing. I am long accustomed to
using the GotFocus event in VB6 to select the text in a textbox when the
control is clicked in or tabbed into.
C# doesn't seem to have an event named GotFocus, so I tried the Enter event
(with SelectAll method). That works for tabbing into, but not clicking. So
I added the MouseDown event. That works half-way: click once and the text
is selected (good); click again and text is again selected (bad).
My desired behavior is this: the user clicks into the box, it selects the
text; without losing the focus on the control, the user clicks again and it
inserts the cursor into the text (nothing is selected).
I am a newbie, so am I missing something obvious? Do I need to override
some method?
Thanks.