Quote Originally Posted by Krool View Post
For those with HideSelection = False did you select the 0 before, because when nothing is selected there is no difference between HideSelection False or True..
Ok, I didn't understand the meaning of HideSelection, now I do.

The Locked property works as in the normal TextBox. It is your responsibility to give it a "Locked look" by for example setting BackColor to vbButtonFace.
Also understood.

In a normal TextBox I can HideCaret on GotFocus.
Code:
Call HideCaret(SpinBox3.hWndEdit)
Fine.
Now it doesn't look like as we can type in something.

When the SpinBox has the focus the border indicates that it has it.
When I now use the arrow up/down keys or the mousewheel, we can see the changing numbers.
But when I use the up/down buttons with the mouse, the text gets highlighted.
Not wanted.

I tried this, but it has no effect:
Code:
Private Sub SpinBox3_TextChange()

Debug.Print "SpinBox3_TextChange"

SpinBox3.SelStart = 0
SpinBox3.SelLength = 0

Debug.Print "len(SpinBox3.SelText)", Len(SpinBox3.SelText)

End Sub

Any idea what I can do to remove the highlight when using the buttons?