Results 1 to 6 of 6

Thread: Printing rotated text to the printer

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Oct 2000
    Location
    Houston, Texas - U.S.A.
    Posts
    84

    Question 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!

  2. #2
    Megatron
    Guest
    Just paint the picture box to the printer.
    VB Code:
    1. Printer.PaintPicture Picture1.Picture, 0, 0

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Oct 2000
    Location
    Houston, Texas - U.S.A.
    Posts
    84

    Post

    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.

  4. #4
    Megatron
    Guest
    Set the Picture to the Image, then print it:
    VB Code:
    1. Picture1.AutoRedraw = True
    2.  
    3. 'Code to draw rotated Text goes here
    4.  
    5. Set Picture1.Picture = Picture1.Image
    6. Printer.PaintPicture Picture1.Picture, 0, 0

  5. #5

    Thread Starter
    Lively Member
    Join Date
    Oct 2000
    Location
    Houston, Texas - U.S.A.
    Posts
    84

    Cool

    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.

  6. #6
    Megatron
    Guest
    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
  •  



Click Here to Expand Forum to Full Width