jcbiker 0 Posted January 28, 2011 Report Share Posted January 28, 2011 Boas tenho este código, If Len(txtMatS) = 2 Then e.Handled = True txtMat.Text = txtMatS + "-" + e.KeyChar + selLength(txtMatS + 1) End If pretendo que no final o cursor esteja no fim. Alguem me pode ajudar?? Link to post Share on other sites
ribeiro55 47 Posted January 28, 2011 Report Share Posted January 28, 2011 Não sei em que âmbito estás a correr as linhas, presumo que num keypress ou semelhante, mas de qualquer maneira podes resolver com TextBox1.SelectionStart = TextBox1.Text.Length TextBox1.Focus() Menos o focus se estiveres num keypress, pois o foco não sai da caixa. Sérgio Ribeiro "Great coders aren't born. They're compiled and released""Expert coders do not need a keyboard. They just throw magnets at the RAM chips" Link to post Share on other sites
jcbiker 0 Posted January 28, 2011 Author Report Share Posted January 28, 2011 Para já resulta. Obrigado Link to post Share on other sites
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now