Results 1 to 6 of 6

Thread: [RESOLVED] Finding Current Cursor Position in Textbox?

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Dec 2006
    Location
    Georgia
    Posts
    170

    Resolved [RESOLVED] Finding Current Cursor Position in Textbox?

    How do you determine the cursor's current position in a textbox?

  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: Finding Current Cursor Position in Textbox?

    You use the SelectionStart and SelectionLength properties. If no text is selected then SelectionLength will be zero.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Dec 2006
    Location
    Georgia
    Posts
    170

    Re: Finding Current Cursor Position in Textbox?

    Thanks. I thought I had read somewhere that this (and similar properties) wasn't available in .NET--that it was from VB6. I was wrong...

  4. #4
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: [RESOLVED] Finding Current Cursor Position in Textbox?

    Had you looked at the member listing for the TextBox class in the MSDN library you would have seen otherwise.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  5. #5

  6. #6
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: [RESOLVED] Finding Current Cursor Position in Textbox?

    And I strongly disagree and reiterate that to assume it's too hard and not bother is a good way to never get better.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

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