I am using the richtextbox, and now when I am saving the File, then the File get saved but not as I want.?
File Name: example
File extension: .txt
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?

Recommended Answers

All 2 Replies

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

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?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.