LPlate
asked on
Determine Bold,Underline and Italic Characters in rich text box control
Hi,
I'm currently doing a project using a rich text control in Visual Basic 6.
I need to output the data from a rich text control into a binary file, remembering what characters font styles have been used within the data (BOLD, UNDERLINE OR ITALIC).
Please help. :->
I'm currently doing a project using a rich text control in Visual Basic 6.
I need to output the data from a rich text control into a binary file, remembering what characters font styles have been used within the data (BOLD, UNDERLINE OR ITALIC).
Please help. :->
To load the file again use
RichTextBox1.LoadFile "c:\myfile.rtf"
RichTextBox1.LoadFile "c:\myfile.rtf"
ASKER
The Device that I output to only supports Binary format files.
For Example, if the rich text box contains the following data "Hello World I'm in hot water", and lets say all o characters are bold, the output file will look like this:
"HellESC<b>oESC<bo> WESC<b>oESC<bo>rld I'm in hESC<b>oESC<bo>t water"
I need to know what characters are Underline, Bold or Italic to that I can generate the data above.
For Example, if the rich text box contains the following data "Hello World I'm in hot water", and lets say all o characters are bold, the output file will look like this:
"HellESC<b>oESC<bo> WESC<b>oESC<bo>rld I'm in hESC<b>oESC<bo>t water"
I need to know what characters are Underline, Bold or Italic to that I can generate the data above.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
You can save the data in a RTF file and preserve all formatting attributes
RichTextBox1.SaveFile "C:\myfile.rtf"