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




Reply With Quote