Rich Text Box

  • Thread starter Thread starter Big E
  • Start date Start date
B

Big E

I'm using VB.net and SQL server 2000. I have a Windows form that has a Rich
Text Box on it. I also have a Font Dialog Box that changes the font and size
in the Rich Text box. When I do a normal update to the database the font
info is not included.

How do I save font information to a database.

Thank you,

E
 
* "Big E said:
I'm using VB.net and SQL server 2000. I have a Windows form that has a Rich
Text Box on it. I also have a Font Dialog Box that changes the font and size
in the Rich Text box. When I do a normal update to the database the font
info is not included.

How do I save font information to a database.

Save the value of the control's 'Rtf' property.
 
Thanks. I got it to work.
Now that it is saved in the database as
{\rtf1\ansi\deff0{\fonttbl{\f0\fnil\fcharset0 Microsoft Sans Serif;}}
how do I retrieve just the text back out to a form without the .rtf stuff.

Thanks.

E
 
* "Big E said:
Thanks. I got it to work.
Now that it is saved in the database as
{\rtf1\ansi\deff0{\fonttbl{\f0\fnil\fcharset0 Microsoft Sans Serif;}}
how do I retrieve just the text back out to a form without the .rtf stuff.

Mhm... I don't have an idea (maybe it works with regular expressions,
but I don't have any regular expressions to do that). The easiest way
is to store the plain text too.
 
If you are retrieving it with .NET code, you can just create a RichTextBox,
set its RTF property to the RTF from Database, then access the RichTextBox's
Text property.


Brian Davis
www.knowdotnet.com
 
Back
Top