Outputting bold text using PrintLine

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Ellie

    Outputting bold text using PrintLine

    I have a VB6 program upgraded to vb.net and I need to use the printline
    function to write to a text file but I need certain characters in bold.
    Would anyone be able to tell me how to do this, if possible? Thanks, Ellie


  • Ellie

    #2
    Re: Outputting bold text using PrintLine

    I probably should have added that this file will then later be read into a
    RichTextBox control and that is the only way it will be viewed.

    "Ellie" <nospam@nospam. netwrote in message
    news:uNw4A$VoIH A.3428@TK2MSFTN GP02.phx.gbl...
    >I have a VB6 program upgraded to vb.net and I need to use the printline
    >function to write to a text file but I need certain characters in bold.
    >Would anyone be able to tell me how to do this, if possible? Thanks, Ellie
    >

    Comment

    • Tom Shelton

      #3
      Re: Outputting bold text using PrintLine

      On 2008-04-18, Ellie <nospam@nospam. netwrote:
      I probably should have added that this file will then later be read into a
      RichTextBox control and that is the only way it will be viewed.
      >
      "Ellie" <nospam@nospam. netwrote in message
      news:uNw4A$VoIH A.3428@TK2MSFTN GP02.phx.gbl...
      >>I have a VB6 program upgraded to vb.net and I need to use the printline
      >>function to write to a text file but I need certain characters in bold.
      >>Would anyone be able to tell me how to do this, if possible? Thanks, Ellie
      >>
      Then you need to write out the text in rtf. At the minimum that might
      look like:

      {\rtf
      This is text with some \b bold\b0 .
      }

      You can find the complete rtf specs online - but that may not be
      necessary if what your doing is simple. One way to figure out what you
      need is to just use Wordpad to create a simple rtf document with the
      feature you want, and then open the generated document in notepad. That
      way you can see the rtf markup.

      --
      Tom Shelton

      Comment

      • Ellie

        #4
        Re: Outputting bold text using PrintLine

        Thanks. I was able to write out a rtb file and then read it into the
        richtextbox.


        "Tom Shelton" <tom_shelton@YO UKNOWTHEDRILLco mcast.netwrote in message
        news:%23NhF0NWo IHA.4912@TK2MSF TNGP03.phx.gbl. ..
        On 2008-04-18, Ellie <nospam@nospam. netwrote:
        >I probably should have added that this file will then later be read into
        >a
        >RichTextBox control and that is the only way it will be viewed.
        >>
        >"Ellie" <nospam@nospam. netwrote in message
        >news:uNw4A$VoI HA.3428@TK2MSFT NGP02.phx.gbl.. .
        >>>I have a VB6 program upgraded to vb.net and I need to use the printline
        >>>function to write to a text file but I need certain characters in bold.
        >>>Would anyone be able to tell me how to do this, if possible? Thanks,
        >>>Ellie
        >>>
        >
        Then you need to write out the text in rtf. At the minimum that might
        look like:
        >
        {\rtf
        This is text with some \b bold\b0 .
        }
        >
        You can find the complete rtf specs online - but that may not be
        necessary if what your doing is simple. One way to figure out what you
        need is to just use Wordpad to create a simple rtf document with the
        feature you want, and then open the generated document in notepad. That
        way you can see the rtf markup.
        >
        --
        Tom Shelton

        Comment

        Working...