Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to goto a point on a RichTextbox and read a line.

Status
Not open for further replies.

bobbyforhire

Technical User
Mar 11, 2008
253
US
I am looking to do the following.

I have a RichTextBox that will contain a few lines up to 10 or so.

Here is an Example:

AAAAAAAAAAAAAAAAAAAAAA
BBBBBBBBBBBBBBBBBBBBB
CCCCCCCCCCCCCCCCCCCCCCCCCCC
DDDDDDDDDDDDDDDDDDDDDDDDD
EEEEEEEEEEEEEEEEEEEEEEEEEE
FFFFFFFFFFFFFFFFFFFF

All of this is the data that i have for in the RichTextbox.

How do i tell my msgbox and or textbox that what i am wanting is the 5th line down and all characters. It will always be the 5th line or 6th or so on.

Results should = "EEEEEEEEEEEEEEEEEEE"

 
Something like:
Code:
MessageBox.Show(RichTextBox1.Lines(4).ToString())
The lines collection is zero based so that will return the 5th line.

Hope this helps

Andy
---------------------------------
[green]' Signature removed for testing purposes.[/green]

 
This is why i stick to networking, thanks again man! Perfect!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top