|
-
Jun 12th, 2001, 02:09 PM
#1
Thread Starter
Lively Member
Printing rotated text to the printer
I found and incorporated John Percival's tip here at VB World on how to print text rotated 90 degrees to a picture box. How do you print that rotated text to the printer? I'm trying to print the form but the rotated text doesn't print correctly.
Thanks for your help!
-
Jun 12th, 2001, 02:33 PM
#2
Just paint the picture box to the printer.
VB Code:
Printer.PaintPicture Picture1.Picture, 0, 0
-
Jun 12th, 2001, 02:45 PM
#3
Thread Starter
Lively Member
I tried that but received an "Invalid Picture" error. Not really sure what's happening.....the problem I'm having is that I want to print the entire form object along with all picture boxes that may contain rotated text.
Thanks for your quick reply!
Last edited by mgoarrow; Jun 12th, 2001 at 02:52 PM.
-
Jun 12th, 2001, 02:57 PM
#4
Set the Picture to the Image, then print it:
VB Code:
Picture1.AutoRedraw = True
'Code to draw rotated Text goes here
Set Picture1.Picture = Picture1.Image
Printer.PaintPicture Picture1.Picture, 0, 0
-
Jun 12th, 2001, 03:32 PM
#5
Thread Starter
Lively Member
Thanks again Megatron for your help!
That did the trick - after setting the PictureBox to the Image, I am able to use the PrintForm method to print the entire form.
-
Jun 12th, 2001, 03:48 PM
#6
Yeah, this is usually something a lot of people forget. Always remember, that whenever do drawing operations, API or otherwise, (with the exception of functions that require you to pass an StdPicture object), that it will be drawn on the Image property.
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
|