Results 1 to 3 of 3

Thread: SOS on my.resource + rtf

  1. #1

    Thread Starter
    New Member
    Join Date
    Oct 2007
    Posts
    2

    SOS on my.resource + rtf

    hey,

    i need help. i figured out how to load a txt file, or an image file using the my.resourcers of vb.2005. however, i want to load a rtf file. when i do that, it shows the code of the file, not the file itself. heeelpp! can my.resources work w rtf?
    thanks!

  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: SOS on my.resource + rtf

    RTF is very much like HTML. A file is just plain text, where the karkup is contained in tags within the text. Just like a Web browser interprets the tags and renders the page, so an RTF reader, like the .NET RichTextBox, interprets the RTF tags and renders the page appropriately.

    Now, the Text property of a RichTextBox contains just the plain text displayed in the control. If you assign your RTF code to the Text property of a RichTextBox then that's the text that will be displayed, tags and all. If you want the page to be rendered then you need to assign the RTF code to the control's Rtf property.

    Note that you would have known this if you'd read the documentation for the RichTextBox control. Beginner or not, the documentation should always be your first stop. That's the best way to become more than a beginner as quickly as possible.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  3. #3

    Thread Starter
    New Member
    Join Date
    Oct 2007
    Posts
    2

    Re: SOS on my.resource + rtf

    thanks. It is not that I am just a beginner, I am not from the computer crowd - I am a psychologist trying to program my research. So most of the times I do not even know where to look for info ;o(. I finally found this forum, and this is the first time that I ask a question. Thank you, though, for your help.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width