Is it possible to set the default position for a masked edit box to the left side, I am using a it for a phone number and I would like the cursor to appear on the first digit regardless od where a user clicks in the box?
Printable View
Is it possible to set the default position for a masked edit box to the left side, I am using a it for a phone number and I would like the cursor to appear on the first digit regardless od where a user clicks in the box?
This code will set the cursor position to the left on the got focus, but the masked edit control has no mouse events, so this is the only easy way to do it.
Hope this helpsCode:Private Sub MaskEdBox1_GotFocus()
MaskEdBox1.SelStart = 0
MaskEdBox1.SelLength = 0
End Sub