Visual Studio - Format text
-
I have developed a Windows forms application using Visual Studio 2010. A part of the application is users writing blocks of text. They are writing in multiline textboxes. The textblocks are stored in mssql as nvarchar(max) I am merging the textblocks to one document using MS ReportViewer It all Works fine, but now the users want to be able to format the text - Bold, underline and bullits etc. I haeve tried using RichTextBox and a thirdparty product TX TextControl. I can format the text and save it in my db. But how do I present the merged document to the users ? Reportviewer cannot show it. Is it possible to use Word as an editor embedded in a WinForms App ? Any help ? mvh ravno
-
I have developed a Windows forms application using Visual Studio 2010. A part of the application is users writing blocks of text. They are writing in multiline textboxes. The textblocks are stored in mssql as nvarchar(max) I am merging the textblocks to one document using MS ReportViewer It all Works fine, but now the users want to be able to format the text - Bold, underline and bullits etc. I haeve tried using RichTextBox and a thirdparty product TX TextControl. I can format the text and save it in my db. But how do I present the merged document to the users ? Reportviewer cannot show it. Is it possible to use Word as an editor embedded in a WinForms App ? Any help ? mvh ravno
if you want present the document for user, you can save before the present. Save method mention below.
private void Save_button_click (object sender, EventArgs e)
{
if(File.Exists("path of file"))
{
MessageBox.Show("Plz chnage your file name");} else { File.Create("Path of the FIle where you want save with Extension, like that d:\\\\testing.txt"); File.WriteAllText("path of the File", "contents"); } }
for any problem faced comment left here.
-
if you want present the document for user, you can save before the present. Save method mention below.
private void Save_button_click (object sender, EventArgs e)
{
if(File.Exists("path of file"))
{
MessageBox.Show("Plz chnage your file name");} else { File.Create("Path of the FIle where you want save with Extension, like that d:\\\\testing.txt"); File.WriteAllText("path of the File", "contents"); } }
for any problem faced comment left here.
-
I have developed a Windows forms application using Visual Studio 2010. A part of the application is users writing blocks of text. They are writing in multiline textboxes. The textblocks are stored in mssql as nvarchar(max) I am merging the textblocks to one document using MS ReportViewer It all Works fine, but now the users want to be able to format the text - Bold, underline and bullits etc. I haeve tried using RichTextBox and a thirdparty product TX TextControl. I can format the text and save it in my db. But how do I present the merged document to the users ? Reportviewer cannot show it. Is it possible to use Word as an editor embedded in a WinForms App ? Any help ? mvh ravno
Crystal Reports supports displaying formatting Rich Text from rtf markup. If that is not an option, you can store the formatted text as html instead of rtf and then use the WebBrowser control to display it (or simply save to html file and start the browser with the file path)