title: How to loop through each character of the selected text in a rich text box
body: <p>I need to loop through each character of the selected text in a rich text box applying a font aspect (family, size, or style) to each character. This aspect is selected using a font dialogue box. I do not want to introduce any other types of dialog box (e.g. color dialogue) into this code.</p>
  
  <p>So far I have tentatively got the following which may well be wrong:</p>
  
  <pre><code>If aFontDialog.ShowDialog = Windows.Forms.DialogResult.OK Then
      If rtb.SelectionFont IsNot Nothing Then
          rtb.SelectionFont = aFontDialog.Font
          rtb.SelectionColor = aFontDialog.Color
      Else
          For index As Integer = 0 To rtb.SelectionLength - 1
             '&lt;&lt;????
          Next
      End If
  End If
  </code></pre>
  
  <p><strong>EDIT</strong></p>
  
  <p>This article on CodeProject explains the problem better than I can
  <a href="http://www.codeproject.com/Articles/12062/Richer-RichTextBox-Part-1" rel="nofollow"><strong>www.codeproject.com...</strong></a> </p>