Hi Trojan,
There's probably an API, but the following works.
Add a pictureBox, set it to Visible=False and use the following code:
VB Code:
Picture1.ScaleMode = vbPixels Picture1.Font.Size = RichTextBox1.SelFontSize Picture1.Font.Name = RichTextBox1.SelFontName MsgBox Picture1.TextHeight(RichTextBox1.SelText)
Added bonus, if needed, Picture1.TextWidth(RichTextBox1.SelText) gets the width.




Reply With Quote