473,473 Members | 4,257 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Save two richtextbox contents into a file

Ang
Hi,

How can I save two richtextbox contents into a file?

if simply join two richtextboxes like joining two string, the output
file will not show the value of second richtextbox.

Thanks for reply.

*** Sent via Developersdex http://www.developersdex.com ***
Jun 27 '08 #1
1 2284
if simply join two richtextboxes like joining two string, the output
file will not show the value of second richtextbox.
Solution 1:

Check the RTF format specification. If you manage to extract the text
body part of the second RTF document, you can insert it just before the
last closing "}" character of the first document.

The tricky part is to find the start of the text body: save the RTF to a
file and open it with notepad. If you can find the first location of a
"\plain" or "\pard" token, try to extract everything from there until
the end (without the last "}")

Solution 2:

Short description: create an invisible RichTextBox and use the clipboard
methods to copy and paste the content of the two other RichTextBoxes
into this box.

Hope this helps (tm)
--
Michael Justin
SCJP, SCJA
betasoft - Software for Delphiâ„¢ and for the Javaâ„¢ platform
http://www.mikejustin.com - http://www.betabeans.de
Jun 27 '08 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Maya | last post by:
Hey, there! I'm new to vb.net and it seems I wouldn't be able to solve this without help. I have a pipe delimited file that has to be saved in txt format so it could be accepted by my DTS...
5
by: Alvo von Cossel I | last post by:
hi, i have a word processor with a richtextbox in the center of the screen. if you paste an image into the richtextbox, it will appear. however, with my openfiledialog, only some text will...
2
by: Tim Smith | last post by:
I have a program that I want to open a file and then save it as a different type (i.e. open a .txt file and save it as a RTF). How can I do this programatically?
6
by: Just Me | last post by:
I've seen code that copies a bmp file into a RichTextBox by first putting it into the clipboard and then using Paste to get it into the RichtextBox. This destroys the clipboard contents. Is...
3
by: Tom Sweet | last post by:
Hi I know how to use the bitmap and graphics objects to create bitmaps and write text on them with the drawString method. I now need to create some BMPs of word or RTF docs. What would be the...
0
by: Vincent | last post by:
Dear all, I have implemented a class to export the content of RichTextBox to image in WYSISYG mode so that line breaks on the screen are the same as exported. C# Code: public struct...
8
by: Paul | last post by:
Hi, My VB is very rusty I'm afraid! What would be the most efficient way to remove the following ASCII characters from a string? à è ì ò ù À È Ì Ò Ù á é í ó ú ý Á É Í Ó Ú Ý â ê î ô û Â Ê Î Ô...
9
by: James Wong | last post by:
Hi, I use the RichTextBox in my program. It will use different language in this RichTextBox (chinese and english characters), and it set the "DualFont" and use different fonts. By the way, how...
1
by: txomin | last post by:
Hi all, Following the instructions of this link http://support.microsoft.com/kb/812425, i've been able to print the content of a RichTextBox control . Apart from that , I want to have the chance...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.