473,322 Members | 1,846 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

Printing contents of an RichTextbox

Hi

When printing coloured text from a RichTextbox, it turns out to be a quite
and timeconsuming job to position all differently coloured strings on the
Page with DrawString(). Is there a better method of achieving this, or are
there samples somewhere? Couldn't find anything on MSDN.

Thanks, Urs
Nov 21 '05 #1
5 2356
Pug
Or even

http://support.microsoft.com/kb/811401/EN-US/

which is better formatted.
"Urs Vogel" <uv****@msn.com> wrote in message
news:e$*************@TK2MSFTNGP12.phx.gbl...
Hi

When printing coloured text from a RichTextbox, it turns out to be a quite
and timeconsuming job to position all differently coloured strings on the
Page with DrawString(). Is there a better method of achieving this, or are
there samples somewhere? Couldn't find anything on MSDN.

Thanks, Urs

Nov 21 '05 #2
Pug
Try this

http://msdn.microsoft.com/library/de...ichTextBox.asp

I've found it works ok but if you want to overlay the output on a bitmap you
have to also use 'sendmessage' to make the richtextbox transparent. With a
little work on the example code it doesn't even need to be onscreen.
"Urs Vogel" <uv****@msn.com> wrote in message
news:e$*************@TK2MSFTNGP12.phx.gbl...
Hi

When printing coloured text from a RichTextbox, it turns out to be a quite
and timeconsuming job to position all differently coloured strings on the
Page with DrawString(). Is there a better method of achieving this, or are
there samples somewhere? Couldn't find anything on MSDN.

Thanks, Urs

Nov 21 '05 #3
Thanks Pug, that sounds reaonable.

"Pug" <no*@this.address> schrieb im Newsbeitrag
news:42***********************@ptn-nntp-reader03.plus.net...
Or even

http://support.microsoft.com/kb/811401/EN-US/

which is better formatted.
"Urs Vogel" <uv****@msn.com> wrote in message
news:e$*************@TK2MSFTNGP12.phx.gbl...
Hi

When printing coloured text from a RichTextbox, it turns out to be a
quite and timeconsuming job to position all differently coloured strings
on the Page with DrawString(). Is there a better method of achieving
this, or are there samples somewhere? Couldn't find anything on MSDN.

Thanks, Urs


Nov 21 '05 #4
Urs,

"Urs Vogel" <uv****@msn.com> schrieb:
When printing coloured text from a RichTextbox, it turns out to be a quite
and timeconsuming job to position all differently coloured strings on the
Page with DrawString(). Is there a better method of achieving this, or are
there samples somewhere?


HOW TO: Print the Content of a RichTextBox by Using Microsoft Visual Basic
..NET
<URL:http://support.microsoft.com/?scid=kb;EN-US;811401>

Getting WYSIWYG Print Results from a .NET RichTextBox
<URL:http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnwinforms/html/wnf_RichTextBox.asp>

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>

Nov 21 '05 #5
There is a special forum setup for printing/report problems:

http://www.windowsforms.net/Forums/S...d=41&ForumID=5

Your question seems to come up everyday or every other day
Nov 21 '05 #6

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

Similar topics

0
by: Páll Ólafsson | last post by:
Hi I have a question about printing a RichTextBox. Today Im using a function written by Michael Gold. A function that does it all but the speed is an issue in this case. If you are printing a...
1
by: Martin | last post by:
Does anyone know how to create the total number of pages? I am using the printpreview, pagesetup, and printdocument. I am printing contents from a richtextbox. I have it already printing but I...
3
by: Ron Courteau | last post by:
All the printing examples I've found in countless books and online examples deal with text files. I want to print the contents of a form that has a couple of text boxes and 4 RichTextBoxes. I...
2
by: PJO | last post by:
I've got a Print menu item on a parent navigation form. How can I get it to print the contents of a RichTextBox located on a child form? TIA -Pat
3
by: Shawn | last post by:
I have been trying to print out the contents of a RichTextBox, but cannot find a way to get the text to show as a new line if the word wrap is used. In other words, if someone types in continuous...
2
by: Dennis | last post by:
How can I print the contents of a rich text box to the graphics object of the PrintPageEventArgs and maintain all the correct colors, bolds, etc. -- Dennis in Houston
0
by: Vincent | last post by:
Dear all, I have implemented a class to export the content of RichTextBox to image in WYSISYG mode so that line breaks on the screen are the same as exported. C# Code: public struct...
2
by: deepakfordotnet | last post by:
Hi, First of all let me confess that I could not get the solution to the same problem from an earlier post Printing :by Mr.Richard MSL (dated September 24th 2006) working. (Replied by Mr.Walter...
1
by: Mike Williams | last post by:
Hi I'm using VB6 and I would like to print the contents of a RichTextBox over a number of A4 pages in landscape so that there are two columns per page with an all round 0.7 inch margin and a...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.