|
-
Jul 21st, 2003, 12:43 AM
#1
How do I print a rich text box?
I have a PrintDialog and a PrintDocument, in conjunction with a Rich Text Box. How the hell would i get the Rich Text Box to print?
I've searched the forum and the only things I've seen are pages and pages of code just to PRINT! I figured .NET would of had a simple function or something..
-
Jul 21st, 2003, 05:32 PM
#2
Ok I got this so far:
VB Code:
Private Sub PrintDocument_PrintPage(ByVal sender As Object, ByVal e As System.Drawing.Printing.PrintPageEventArgs) Handles PrintDocument.PrintPage
e.Graphics.DrawString(txtBoxChild.Text.ToString(), New Font("Vernada", 11, FontStyle.Regular), Brushes.Black, 4, 7)
End Sub
This works perfect except for 1 problem... if I put too much text on 1 line, it cuts that text off. How can I force it to word wrap when printing so nothing gets cut off?
-
Jul 21st, 2003, 05:48 PM
#3
Sorry to top this question so much, but can I make it so a red line appears at the right margine line? This way people will know when the text is going to get cut off.
I know I can set the right margin to something so no one can go past it, but the reason for this program, people will probably go past it all the time.
If anyone has used Dev Shed C++ IDE, you'll know what i'm talking about
-
Jul 22nd, 2003, 05:51 PM
#4
No one? 
I've been trying to figure it out but I'm not sure how I would craete a line... hmm I'm sure I could like display a bar or something at the point but then... the users would have to delete it and I want it to be a small background line...
hmm...
-
Jul 22nd, 2003, 11:45 PM
#5
Hyperactive Member
why don't you save the text as a document and print the document?
-
Jul 23rd, 2003, 02:14 PM
#6
Originally posted by RichardAtherton
why don't you save the text as a document and print the document?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|