Jelmer Posted September 25, 2006 Posted September 25, 2006 hello I have a little code to change a '.' into a ','. But after the changing the cursor is put to the beginning of the textfield. Before: 45.| after translation: |45, The | is the cursor. My code: txtPrijs.Text = txtPrijs.Text.Replace(".", ","); I like to put the cursor tot the end of the line.. But how? Quote
mskeel Posted September 25, 2006 Posted September 25, 2006 Assume there's a form with a textbox and a button. In the button's click event, put the following code... Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button5.Click Me.TextBox2.Focus() Me.TextBox2.Text = "superfly crazy!!" Me.TextBox2.Select(Me.TextBox2.Text.Length, Me.TextBox2.Text.Length) '' <------- The important line for you. End Sub Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.