When Clicking a Textbox, How to Give it Focus but Not Change the Cursor Location Inside It
<p>I created an event handler for the <code>Textbox.Enter event</code>, which selects a part of the text inside the textbox, like this:<br>
<code>TextBox1.Select(3,5);</code></p>

<p>The result looks like this:</p>

<p><IMG SRC="http://s10.postimg.org/58ez9mthh/image.png"></p>

<p>When the Textbox is entered via the Keyboard via <strong>[Tab]</strong> or <strong>[Shift]-[Tab]</strong>,<br>
the part of the text that needs to be selected is selected well, just like in the screenshot above.</p>

<p>However if the textbox is entered not via the keyboard but via the mouse,<br>
then nothing is selected:</p>

<p><IMG SRC="http://s11.postimg.org/g3353sjm7/ts2.png"></p>

<p>It seems that what happens is this:</p>

<p>When we enter the textbox with the mouse,<br>
the click indeed raises the <code>Enter event</code>, but the mouseclick also sets the location of the cursor, to the location the user clicked with the mouse, inside the textbox.<br>
And this setting of the cursor happens <strong>right after</strong> the event handler was ran.</p>

<p>So this means, that the selection that the event handler performed (with the <code>TextBox1.Select(3,5);</code> line), is overridden by the mouse's location,<br>
and that's why entering the textbox with the mouse, appears to not select anything.</p>

<h2>My question:</h2>

<p>How can I make the mouse indeed raise the <code>Enter event</code>, yet not change the cursor position inside the textbox?<br>
So I will then be able to have my selection (that happens in code) remain and not be overridden..</p>

<p>Edit:<br>
The purpose of this is to enable easy selection of the <strong>MM:SS</strong> part of the time, which is usually the part that is being edited (the HH or mmm parts are rarely changed).</p>