0

I am using the richtextbox, and now when I am saving the File, then the File get saved but not as I want.?
Example:
File Name: example
File extension: .txt
Body:
1.)Hey guys, Whats up?
2.)R u Fine ???
3.)Reply soon

Now When I save the file and open in the notepad. then its seem as:
1.)Hey guys, Whats up?R u Fine ???Reply soon
while if I open the same file with Wordpad then no problem it looks as it should...

So how can I edit this things.
Using Richtextbox only, reason: change specific text fonts/colour/save as rtf,txt,doc etc...

If I add the Following code to my project:
RichTextBox1.SaveFile(SaveFileDialog1.FileName, RichTextBoxStreamType.PlainText) then I will get the output but without font colour/back colour, font size, and all... this is saving as txt file but with different extension (that we save)

Any Idea?

Edited by Deep Modi: More Details

2
Contributors
2
Replies
16
Views
3 Years
Discussion Span
Last Post by Deep Modi
0

Are you asking how to get Notepad to recognize fonts and colors in the text you saved from RighEdit control? That will never happen.

Edited by Ancient Dragon

0

I am need in creating the Wordpad,
Which allow this all features,
and I have design the new look, but I am steed having trouble,
I add the Save As and then the types.ext as follow:
Save As
► Text Document (.txt)
► Rich Text Document (.rtf)
► Document (.doc)
► All Files (. {nt sure})

So when the User click the Text Document the File will be saved as the .txt so the code that i describe in the article that code will work
if Rich Te... then saves as rtf by replacing the (plaintext with the Richtext)

But the Problem is when I save the File as txt and then again try to save doc. as the RTF then This will just replace the File, while this will not create with the new extension...

Any reasons? And what Can I do so?

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.