bradl45 Posted November 2, 2002 Posted November 2, 2002 Here is some code I use to high light a textbox when a user needs to re-enter data into a textbox, it works great in vb6 but not in .Net. Does anyone know what methods I would use in .Net to preform the same action. txtname.Setfocus txtname.Selstart = 0 txtname = Len(txtName.Text) Thanks Brad SLC, Utah Quote
*Experts* Volte Posted November 2, 2002 *Experts* Posted November 2, 2002 Try this: txtName.Focus() txtName.Select(0, txtName.Text.Length) Quote
*Experts* Volte Posted November 4, 2002 *Experts* Posted November 4, 2002 I just realized you can shorten that last line down to txtName.SelectAll, but the other way will work too. 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.