Cursor position (Textbox)

macmak

New member
Joined
Mar 14, 2007
Messages
1
Programming Experience
1-3
I have done a textbox to automatically write the ":" of the time like this:

VB.NET:
If Len(TXTbox.Text) = 2 Or Len(TXTbox.Text) = 5 Then
TXTbox.Text = TXTbox.Text & ":"
TXTbox.SelectionStart = Len(TXTbox.Text) + 1
End If

But now I have a problem. The selectionstart property doens't allow me to throw the cursor before it and I need to erase the characters just like the backspace button. And i don't want to use a clean textbox button.
I'd like to know if someone knows another way to move the cursor in the textbox that's not selectionstart.
Thanks in advance for the attention.
 
Back
Top