• 0

Simple VB question


Question

4 answers to this question

Recommended Posts

  • 0

Quick Google search: http://www.codeproject.com/KB/string/nrtftree.aspx

The library is coded in C# but it's .NET so you can use it from VB.

Also have a look at http://msdn.microsoft.com/en-us/library/system.windows.forms.richtextbox(VS.80).aspx , looks more official.

  • 0
  On 27/08/2010 at 01:35, ZeeTX said:

I tried using the SelectionFont & SelectionColor attributes but that changes the formatting in the form itself but doesnt write the same to the .rtf file. Any ideas?

Those properties, as their names imply, format the selected text in the RichTextBox control. To write the contents to a file, either use the SaveFile method or retrieve the RTF formatted text from the Rtf property and save that using a stream. The "Text" property doesn't retrieve the RTF codes.
  • 0
  On 27/08/2010 at 08:53, boogerjones said:

Those properties, as their names imply, format the selected text in the RichTextBox control. To write the contents to a file, either use the SaveFile method or retrieve the RTF formatted text from the Rtf property and save that using a stream. The "Text" property doesn't retrieve the RTF codes.

Could you post a two line example?

I'm already using the SaveFile method to write the contents of the text boxes to a .rtf file but it does so without any formatting.

Thanks boogerjones!

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.