title: VB specific line of text to bold in a multi-line TextBox
body: <p>I'm writing a reminder program in vb.net that reads a text file and displays dated entries from today to 14 days from today. I want entries for today's date to be in bold. If it makes any difference I'm using a TextBox instead of Rich TextBox  This is what I've tried:</p>
  
  <pre><code>Public Sub getReadFile()
  
      ' rtfRead is the name of the TextBox
  rtfRead.Text = Nothing
  ' Today, the first read line date
  Dim startDate As Date = Date.Now()                                          
      ' First dated line to read
  Dim todayDate As String = (GetDateInMyFormat(startDate))                    
      ' The last read line date
  Dim endDate As String = (GetDateInMyFormat(DateAdd("d", 14, startDate)))
      ' The first 4 characters of a line. Are the 4 charcters numbers, i.e. yyyy
  Dim lineStart As Object
      ' The date at the beginnig of a an entry
  Dim lineDate As String = Nothing
      ' Are the first 4 charcters of a line numeric = True
  Dim isNum As Boolean = False
      ' TM_Notes.txt
  Dim readFile As String = Nothing    
  Dim oldFont As Font = rtfRead.Font
  Dim boldFont As Font = New Font(rtfRead.Font, FontStyle.Bold)
  
  Try
      ' Create an instance of StreamReader to read from a file.
      ' The using statement also closes the StreamReader.
      Using sr As New StreamReader("TM_Notes.txt")
          Dim lineRead As String
  
          ' Read and display lines from the file until the end of
          ' the file is reached.
          Do
              lineRead = sr.ReadLine()
  
              lineStart = Mid(lineRead, 1, 4)
              isNum = IsNumeric(lineStart)
  
              If isNum = True Then
                  lineDate = GetDateInMyFormat(Mid(lineRead, 1, 10))
              End If
  
              If lineDate = todayDate Then
                  rtfRead.Font = boldFont
              Else
                  rtfRead.Font = oldFont
              End If
  
              If Not (lineRead Is Nothing) And isNum = False And lineDate &lt;= endDate Then
                  readFile = readFile + lineRead &amp; vbCrLf
              ElseIf lineDate &gt;= todayDate And lineDate &lt;= endDate Then
                  readFile = readFile + lineRead &amp; vbCrLf
              End If
  
          Loop Until lineRead Is Nothing
      End Using
  
      rtfRead.Text = readFile
  
  Catch ex As Exception
      ' Let the user know what went wrong.
      Console.WriteLine("The file could not be read:")
      Console.WriteLine(ex.Message)
  End Try
  End Sub
  </code></pre>
  
  <p>I don't get any errors but today's date isn't in bold.</p>
  
  <p>It today is 02-11  then the Test string line should be bold.</p>
  
  <p>2014-02-11: Test string</p>
  
  <p>2014-02-12: Test string 2</p>
  
  <p><strong>UPDATE</strong></p>
  
  <p>I've changed to a Rich TextBox and updated my code sample to to reflect my code changes.  I'm still not getting Bold</p>