Results 1 to 4 of 4

Thread: [RESOLVED] Highlight Contents

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Sep 2006
    Location
    London, UK
    Posts
    817

    Resolved [RESOLVED] Highlight Contents

    How do I highlight the contents of a textbox when gets focus?

  2. #2
    Fanatic Member
    Join Date
    Oct 2008
    Location
    Dominican Republic
    Posts
    733

    Re: Highlight Contents

    I think you can do this:

    vb.net Code:
    1. If TextBox1.Focused = True Then
    2.     TextBox1.SelectAll()
    3. End If

    Hope it helps
    "In our profession, precision and perfection are not a dispensable luxury, but a simple necessity."
    Niklaus E. Wirth


    Rate any post that helped you, it's a good way of saying thanks
    Please specify your Visual Studio Version!

    Why rating is useful

    My Code Bank Submissions: How to determine Windows Version| Working With Mouse Events | Blocking Input Using API | Get host's IP | Minimize to system tray "animated" | Colored ListBox (custom fonts, colors, highlight) Updated -New Class! | [VS 2008] Strong encryption and hashing class - Updated! 31/August/2009 | Create a shortcut using IWshRuntimeLibrary

  3. #3

    Thread Starter
    Fanatic Member
    Join Date
    Sep 2006
    Location
    London, UK
    Posts
    817

    Re: Highlight Contents

    A little simpler than VB6. Thankyou.

  4. #4

    Thread Starter
    Fanatic Member
    Join Date
    Sep 2006
    Location
    London, UK
    Posts
    817

    Re: [RESOLVED] Highlight Contents

    If I have 10 textboxes, can I handle them under the same event?
    How do I group them together?

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