473,487 Members | 2,483 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

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 1149
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
2655
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
1824
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
4824
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
2063
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
2098
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
986
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
1495
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
2305
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
1577
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
6967
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7181
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6847
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7352
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
4875
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4565
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3078
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3071
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
618
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.