Hello,
I work with Jet4.0 Databases all the time and use RichTextBoxes Often to retrieve RTF data from fields inside the database.
I have never run into the problem you are expaining about having a "@" at the beginning of the stored data.
How are you retrieving the data into the RichTextBox. Here are some examples that work for me.
Example 1,
Create A Dataset and bind the data to the rtf property of the RichTextBox
RichTextBox1.DataBindings.Add("RTF", ADataset, "TableName.ColumnName")
Example 2.
Create A Dataset and Fill the RichTextBox from a DataRow
Dim ADataRow as DataRow = ADataset.Tables("TableName").Rows(0)
RichTextBox1.RTF = ADataRow("ColumnName")
Example 3.
Create A CommandObject and Fill the RichTextBox from the object
Dim ACommand as new Oledb.Command = AConnection.CreateCommand
ACommand.CommandText = "Select * FROM TableName WHERE ID = 1"
AConnection.Open
RichTextBox1.RTF = ACommand.ExecuteScalar
AConnection.Close
Hope this helps,
Chuck
Maybe I am misunderstanding your question. Are you trying to add a "@" before the text in the RTF Box?
If so try this:
If the font and RTF is always going to be the same, you can add a "@" into the RTF by parsing the string and inserting a character into it after the RTF Header.
Dim AString as string = "{\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttb l{\f0\fswiss\fprq2\fcharset0 Arial;}}\viewkind4\uc1\pard\f0\fs24 The remainder Of The Text Goes Here \par}"
AString = AString.Insert(114, "@")
RichTextBox1.Rtf = AString
The Result =
{\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl {\f0\fswiss\fprq2\fcharset0 Arial;}}\viewkind4\uc1\pard\f0\fs24 @ The remainder Of The Text Goes Here \par}"