Microsoft Communities

Welcome to WindowsClient.net | Sign in | Join

Here are some frequently asked questions about Windows Forms and their answers.

Windows Forms FAQs

How do I load an RTF encoded string into a RichTextBox?

Use the Rtf property of the control.

richTextBox1.Rtf  =
  @"{\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl
    {\f0\fswiss\fcharset0 Arial;}}\viewkind4\uc1\pard\b\i\f0\fs20
    This is bold italics.\par }";

Contributed from George Shepherd's Windows Forms FAQ



Page view counter