User Name
Password

Go Back   Planetarion Forums > Non Planetarion Discussions > Programming and Discussion

Reply
Thread Tools Display Modes
Unread 19 Apr 2006, 12:47   #1
apocalypse_202
Eternal_Apocalypse
 
Join Date: Apr 2006
Location: Australia
Posts: 4
apocalypse_202 is an unknown quantity at this point
Question vb2005 rich text format resource

Hey, im using vb2005 express and i want to have a rich text (or html) file as a resource. When you go to the help form in the program, i want it to load the file into the rich text box / browser.

When i try to use this code, it says "ILLEGAL CHARACTERS IN PATH

RichTextBox1.LoadFile (My.Resources.Help)

The resource is named "Help.rtf" by the way!

Can anyone please tell me, what i need to do to get it working??
Thnx, Rob
apocalypse_202 is offline   Reply With Quote
Unread 20 Apr 2006, 01:58   #2
JammyJim
Godfather
 
JammyJim's Avatar
 
Join Date: May 2000
Location: England
Posts: 5,185
JammyJim has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.JammyJim has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.JammyJim has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.JammyJim has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.JammyJim has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.JammyJim has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.JammyJim has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.JammyJim has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.JammyJim has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.JammyJim has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.JammyJim has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.
Re: vb2005 rich text format resource

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
RichTextBox1.LoadFile("c:\test.rtf")
End Sub


and it worked fine?
__________________
Forum Administrator
Mail : [email protected] // IRC : #forums
__________________
It's not personal, it's just business.
JammyJim is offline   Reply With Quote
Unread 20 Apr 2006, 01:59   #3
JammyJim
Godfather
 
JammyJim's Avatar
 
Join Date: May 2000
Location: England
Posts: 5,185
JammyJim has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.JammyJim has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.JammyJim has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.JammyJim has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.JammyJim has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.JammyJim has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.JammyJim has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.JammyJim has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.JammyJim has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.JammyJim has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.JammyJim has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.
Re: vb2005 rich text format resource

obviously replace 'test.rtf' with help.rtf

and obviously that loads up the rtf file when the form is loaded. If you wanted it on button click then you do the normal...


Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

'<insert code here>

End Sub
__________________
Forum Administrator
Mail : [email protected] // IRC : #forums
__________________
It's not personal, it's just business.
JammyJim is offline   Reply With Quote
Unread 20 Apr 2006, 02:05   #4
JammyJim
Godfather
 
JammyJim's Avatar
 
Join Date: May 2000
Location: England
Posts: 5,185
JammyJim has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.JammyJim has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.JammyJim has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.JammyJim has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.JammyJim has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.JammyJim has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.JammyJim has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.JammyJim has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.JammyJim has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.JammyJim has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.JammyJim has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.
Re: vb2005 rich text format resource

heh sorry my apologies i mis-read (its late)


try



RichTextBox1.Text = My.Resources.help



you dont need to load as far as im aware as its already part of the project or something.
__________________
Forum Administrator
Mail : [email protected] // IRC : #forums
__________________
It's not personal, it's just business.
JammyJim is offline   Reply With Quote
Unread 20 Apr 2006, 07:26   #5
apocalypse_202
Eternal_Apocalypse
 
Join Date: Apr 2006
Location: Australia
Posts: 4
apocalypse_202 is an unknown quantity at this point
Angry Re: vb2005 rich text format resource

hmnn, yeh that worked better, i didnt get an error at least. Its just that now it shows the rich text file as if it were opened in notepad and not a rich text editor program like Word

like this...:

{\rtf1\ansi\ansicpg1252\uc1\deff0\stshfdbch0\stshfloch0\stshfhich0\stshfbi0\deflang1033\deflangfe103 3{\fonttbl{\f0\froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\f36\froman\fcharset238\fprq2 Times New Roman CE;}

etc.. etc...

this isnt gonna be much help to the user ( )
apocalypse_202 is offline   Reply With Quote
Unread 20 Apr 2006, 07:29   #6
apocalypse_202
Eternal_Apocalypse
 
Join Date: Apr 2006
Location: Australia
Posts: 4
apocalypse_202 is an unknown quantity at this point
Re: vb2005 rich text format resource

FIXED!! dont worry i worked it out. instead of

RichTextBox1.text = My.Resources.Help

i had to use

RichTextBox1.RTF = My.Resources.Help

Thnx for your help anyway tho JammyJim
apocalypse_202 is offline   Reply With Quote
Reply


Thread Tools
Display Modes

Forum Jump


All times are GMT +1. The time now is 14:01.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2002 - 2018