472,789 Members | 1,260 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,789 software developers and data experts.

Avoid formatting codes when printing or saving

Hi!

I've made a simple text editor as a training issue in C#.NET.
It is a TextBox control on a form.

However when I save the file or
send to printer I'll get the following

{\rtf1\ansi\deff0{\fonttbl...

and so on with the actual text embedded.

How can I in the code set the right settings for either the save or
print operations?

Me.Name

Nov 23 '05 #1
1 1126
Hi!

I solved it, I think.

I just added some arguments to my code:

reWrite.SaveFile(myFile,RichTextBoxStreamType.Rich Text);

and then I made the file be saved as

myCalendar.SelectionStart.ToString() + ".rtf";

gs***@hotmail.com skrev:
Hi!

I've made a simple text editor as a training issue in C#.NET.
It is a TextBox control on a form.

However when I save the file or
send to printer I'll get the following

{\rtf1\ansi\deff0{\fonttbl...

and so on with the actual text embedded.

How can I in the code set the right settings for either the save or
print operations?

Me.Name


Nov 24 '05 #2

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

Similar topics

2
by: Konrad Koller | last post by:
Under Windows print formatting (header, footer etc.) is OK. Under LINUX it does not work. SciTEGlobal.properties state around line 352: # Printing - only works on Windows Why? How is print...
4
by: Rob Meade | last post by:
Hi all, Ok - this leads on from speaking to a couple here and in the SQL server group... I've an application which allows the user to type in their text into a form, they add 'happy' tags...
6
by: Ot | last post by:
I have an xml document similar to this <all> <one> <options attr1="1" attr2="2" /> <item name="a name" attr1="1" /> <item name="another" attr1="2"/> </one> <two> <options attr1="1"...
4
by: Dave Brydon | last post by:
Access 2003 I have a combo box in my personnel table, which draws its data from a trade code table; the original field in the code table, is numeric, Long Integer, and formatted with 5 zero's . ...
1
by: CM | last post by:
Hi, I'm thinking about writing .net codes (asp.net, vb.net) for printing management, such as keep tracking of who prints what on when...etc. The app will need to find all available network...
0
by: STP.NET | last post by:
Hello, Is there a way to configure Visual Studio 2005 to reformat the C# source code automatically when a file opens? I worked with several dozens of C# developers at work, open-source...
3
by: DavidKrutsko | last post by:
Hey, consider the following chunk of code #define CONSTANT 5 void func (const char *Code) { map <pChar, pChar> Codes;
9
by: john coltrane | last post by:
Is there way to create a formatted string in a similar that is similar to sprintf? The same for printing, printf? C,D,E,F,G,N,X for currency, decimal, exponential, fixed, general, numerical,...
6
by: =?Utf-8?B?UVNJRGV2ZWxvcGVy?= | last post by:
I am using a RichTextControl (C# VS2005 .NET 2.0) and allowing users to change the font and color of what ever they select. The problem I am having is that when I select a second set of character...
0
by: erikbower65 | last post by:
Using CodiumAI's pr-agent is simple and powerful. Follow these steps: 1. Install CodiumAI CLI: Ensure Node.js is installed, then run 'npm install -g codiumai' in the terminal. 2. Connect to...
0
linyimin
by: linyimin | last post by:
Spring Startup Analyzer generates an interactive Spring application startup report that lets you understand what contributes to the application startup time and helps to optimize it. Support for...
0
by: erikbower65 | last post by:
Here's a concise step-by-step guide for manually installing IntelliJ IDEA: 1. Download: Visit the official JetBrains website and download the IntelliJ IDEA Community or Ultimate edition based on...
0
by: kcodez | last post by:
As a H5 game development enthusiast, I recently wrote a very interesting little game - Toy Claw ((http://claw.kjeek.com/))。Here I will summarize and share the development experience here, and hope it...
0
by: Taofi | last post by:
I try to insert a new record but the error message says the number of query names and destination fields are not the same This are my field names ID, Budgeted, Actual, Status and Differences ...
14
DJRhino1175
by: DJRhino1175 | last post by:
When I run this code I get an error, its Run-time error# 424 Object required...This is my first attempt at doing something like this. I test the entire code and it worked until I added this - If...
5
by: DJRhino | last post by:
Private Sub CboDrawingID_BeforeUpdate(Cancel As Integer) If = 310029923 Or 310030138 Or 310030152 Or 310030346 Or 310030348 Or _ 310030356 Or 310030359 Or 310030362 Or...
0
by: lllomh | last post by:
How does React native implement an English player?
2
by: DJRhino | last post by:
Was curious if anyone else was having this same issue or not.... I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...

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.