Results 1 to 10 of 10

Thread: Embedded RTF [Gave up on]

Threaded View

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Dec 2003
    Posts
    127

    Angry Embedded RTF [Gave up on]

    I have the Help.rtf set as Embedded Resource and am trying to use this to read the Help.rtf file into the Rich Text Box and it doesn't load anything. Can someone give me pointers on what part of it's wrong.... or maybe a better way of doing it.

    P.S. My Help.rtf file contains text, links to websites and graphics if this makes a diffrence.

    Code:
    Imports System.IO
    Public Class Form3
        Inherits System.Windows.Forms.Form
    
    +windows Form Designer Generated Code
    
     Private Sub Form3_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    
            Dim stream As Stream = Me.GetType().Assembly.GetManifestResourceStream("MyNameSpace.Help.rtf")
            If Not (stream Is Nothing) Then
                Dim sr As New StreamReader(stream)
                RichTextBox1.LoadFile(stream, RichTextBoxStreamType.RichText)
                sr.Close()
            End If
        End Sub
    End Class
    Last edited by teamdad; Aug 3rd, 2004 at 01:07 PM.

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