how to get only the displayed part of text from richtext box
<p>I want only displayed text from richtext box in string form</p>

<p>I have found the initial linenumber and last linenumber through</p>

<pre><code>Point pos = new Point(0, 0);
int firstIndex = this.GetCharIndexFromPosition(pos);
int firstLine = this.GetLineFromCharIndex(firstIndex);

//now we get index of last visible char and number of last visible line
pos.X = ClientRectangle.Width;
pos.Y = ClientRectangle.Height;
int lastIndex = this.GetCharIndexFromPosition(pos);
int lastLine = this.GetLineFromCharIndex(lastIndex);

//this is point position of last visible char, 
//we'll use its Y value for calculating numberLabel size
pos = this.GetPositionFromCharIndex(lastIndex);
</code></pre>

<p>how can I get filter rtb text and get only the displayed part of text?</p>
