Results 1 to 2 of 2

Thread: what line the cursor is on in a Rich text box?

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Aug 2000
    Location
    Texas
    Posts
    313

    Question

    Is there a way to find out what line the cursor is on in a rich text box? I know you can get what the position is, but I want just the line.

  2. #2
    Guest
    You can use the GetLineFromChar function.

    Code:
    Private Sub Command1_Click()
    'Top/First line = 0
    MsgBox RichTextBox1.GetLineFromChar(RichTextBox1.SelStart)
    End Sub

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