I need your help...!
If you need help with a project or need to know how to do something specific in VB.NET then please ask your questions in here.
Forum rules
Please LOCK your topics once you have found the solution to your question so we know you no longer require help with your query.
Please LOCK your topics once you have found the solution to your question so we know you no longer require help with your query.
6 posts
Page 1 of 1
that i cant figure out why i cant save the colors, font styles that i specified after editing on a richtext box.
the database only saves a normal textfile without specific fontstyles , fonsize on each word.
I hope you know what i mean,
please check this out.. may be there's someone who could help me...!
here's is the application i made.
http://www.mediafire.com/download.php?5fdw330uja28h6p
You do not have the required permissions to view the files attached to this post.
When you save the file, use this code:
Code: Select all
This'll save the file in rich format, preserving the colors and fonts.RichTextBox1.SaveFile("filename",RichTextBoxStreamType.RichText)
@comathi.
Thank you for a fast reply, your suggestion is right about saving the file back to your PC but this case is different
its a database where-in the file and the edited fonts and styles specifically
needs to be saved inside the database. the problem occurs after finally editing the file, likes changing its font styles,
size, bullets, highlights, colors then save it to database , where-in the saved file inside
the databse goes back to plain text w/o specific colors and styles.
Thank you for a fast reply, your suggestion is right about saving the file back to your PC but this case is different
its a database where-in the file and the edited fonts and styles specifically
needs to be saved inside the database. the problem occurs after finally editing the file, likes changing its font styles,
size, bullets, highlights, colors then save it to database , where-in the saved file inside
the databse goes back to plain text w/o specific colors and styles.
I don't think your database can contain rich text. However, you could always try saving HTML to the database. That way you could keep the correct formatting in a webbrowser and simply edit the code in a plain text editor.
EDIT:
I stand corrected, there is a way to achieve what you want to accomplish. When saving the file, do the following:
EDIT:
I stand corrected, there is a way to achieve what you want to accomplish. When saving the file, do the following:
Code: Select all
When it comes time to re-edit the file, you can do this:Dim rtfStr As String=RichTextBox1.Rtf
'Now, here, you can insert rtfStr into your database
Code: Select all
Thanks to this link for getting me on the right track.Dim rtfStr As String = 'Get the info from the database to your String
RichTextBox1.Rtf=rtfStr
Thanks, i will try your suggestions.... Im happy for your fast reply to my post.! wahooo;
you can add this things]

Code: Select all
i found them from my old html editor
CursorPositionToolStripMenuItem.Text = "Cursor Position: " & RichTextBox1.SelectionStart
CurrentLineToolStripMenuItem.Text = "Current Line: " & RichTextBox1.GetLineFromCharIndex(RichTextBox1.SelectionStart) + 1
TotalCharactersToolStripMenuItem.Text = "Total Characters: " & RichTextBox1.TextLength
ToolStripMenuItem2.Text = " Total Lines: " & RichTextBox1.Lines.Length

Find my programs on Softpedia
6 posts
Page 1 of 1
Copyright Information
Copyright © Codenstuff.com 2020 - 2023