Results 1 to 2 of 2

Thread: [RESOLVED] [2008] Move the cursor in the textbox

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Dec 2001
    Posts
    134

    Resolved [RESOLVED] [2008] Move the cursor in the textbox

    Hi,
    when the textbox got selected (and have some text) I need to move the cursor to the last position? or in the middle? how can I do that?

  2. #2
    Frenzied Member
    Join Date
    Mar 2005
    Location
    Sector 001
    Posts
    1,577

    Re: [2008] Move the cursor in the textbox

    Use the Select method specifying the start yourself and using 0 for length.
    TextBox1.Select(3, 0) 'moves the caret 3 chars right from the beginning
    TextBox1.Select(TextBox1.Text.Length, 0) 'Moves the caret to the end and beyond
    VB 2005, Win Xp Pro sp2

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