Results 1 to 3 of 3

Thread: How do I code a highlight of the entire text in text box?

  1. #1

    Thread Starter
    Addicted Member Daniel_Christie's Avatar
    Join Date
    Jan 2000
    Location
    USA
    Posts
    245
    How do I code a highlight of the entire text in text box?

    I have a text box on a form and I need to have all of the text highlighted in the text box when the form loads.

    I appreciate any effort and time,
    Daniel Christie

  2. #2
    Fanatic Member Kaverin's Avatar
    Join Date
    Oct 2000
    Posts
    930
    This will do what you asked:
    Code:
    Text1.SelLength = Len(Text1.Text)
    I'm baaaack...
    VB5 Professional Edition, VC++ 6
    Using a 1 gHz Thunderbird, 256 mb RAM, 40 gb HD system with Win98se

    I feel special because I finally figured out how to loop midis: Post link
    I'm a fanatic too

  3. #3
    Lively Member
    Join Date
    Aug 2000
    Posts
    125
    might also need selstart

    Code:
    Text1.SelStart = 0
    Text1.SelLength = Len(Text1.Text)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width