Welcome to Dream.In.Code
Getting VB Help is Easy!

Join 136,460 VB Programmers for FREE! Get instant access to thousands of VB experts, tutorials, code snippets, and more! There are 1,734 people online right now. Registration is fast and FREE... Join Now!




Rich text box

 
Reply to this topicStart new topic

Rich text box

deepa.anand
28 Jul, 2008 - 06:08 AM
Post #1

New D.I.C Head
*

Joined: 25 Jul, 2008
Posts: 8

How do i load a rtf file into richtext box?
My code didn't work
This was the code
CODE
rtb.LoadFile ("G:\foldername\AddReminder.rtf")




User is offlineProfile CardPM
+Quote Post

dineeshd
RE: Rich Text Box
28 Jul, 2008 - 06:17 AM
Post #2

D.I.C Addict
Group Icon

Joined: 30 Jun, 2008
Posts: 578



Thanked: 16 times
Dream Kudos: 575
My Contributions
Try this....... cool.gif

CODE
rtb.LoadFile ("G:\foldername\AddReminder.rtf", RichTextBoxStreamType.RichText)

User is offlineProfile CardPM
+Quote Post

Zhalix
RE: Rich Text Box
28 Jul, 2008 - 06:19 AM
Post #3

D.I.C Head
**

Joined: 7 May, 2008
Posts: 218



Thanked: 9 times
My Contributions
Well, that's the right code..

Does it say the filepath is invalid? If that's the case, double-check the path and make the change where necessary.

If there's no error and simply nothing is happening, the event probably isn't firing. Where are you putting this code?
User is offlineProfile CardPM
+Quote Post

deepa.anand
RE: Rich Text Box
28 Jul, 2008 - 06:33 AM
Post #4

New D.I.C Head
*

Joined: 25 Jul, 2008
Posts: 8

That was a quick response! Thanks All

On click of an item in the listbox, the reminder.rtf file should be loaded into the richtextbox..

The event is getting triggered but it doesn't load into the rich text box..File path is also correct!

Thanks All



User is offlineProfile CardPM
+Quote Post

Zhalix
RE: Rich Text Box
28 Jul, 2008 - 06:41 AM
Post #5

D.I.C Head
**

Joined: 7 May, 2008
Posts: 218



Thanked: 9 times
My Contributions
Does the Rich Text File actually have anything in it? A blank file would make it seem like nothing was loading.

Also, double check where you've placed the code. You may think it's in the Click event, but it might be somewhere else.
User is offlineProfile CardPM
+Quote Post

deepa.anand
RE: Rich Text Box
28 Jul, 2008 - 06:47 AM
Post #6

New D.I.C Head
*

Joined: 25 Jul, 2008
Posts: 8

Hey thanks once again!

I fixed it! The condition which i gave was wrong.
User is offlineProfile CardPM
+Quote Post

Zhalix
RE: Rich Text Box
28 Jul, 2008 - 06:48 AM
Post #7

D.I.C Head
**

Joined: 7 May, 2008
Posts: 218



Thanked: 9 times
My Contributions
Cool. icon_up.gif
User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic
Time is now: 12/2/08 04:17PM

Live VB Help!

VB Tutorials

Reference Sheets

VB Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month