Cursor in TextBox

Eleventeen

Active member
Joined
Jan 3, 2003
Messages
39
Location
Canada
How do you get the position of the edit cursor in the textbox?

What I need is to tell if the cursor is at the end of the text or the beginning.

Thanks!
 
Code:
  Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click
        MsgBox(TextBox1.SelectionStart)
    End Sub
returns the current value , eg: if your textbox contains "test" and the cursor is flashing in between the "te" and "st" it would return 2
 
Back
Top