Results 1 to 6 of 6

Thread: Print a picture box content

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Jan 1999
    Location
    México, D.F.
    Posts
    84

    Print a picture box content

    Hi vb-forum:

    I have a print preview form made it with pictures boxes, the picture box has text, a report, but I'd like to print it directly, because the picture already has the format an pages, How can I send this picture box to the printer?, I'm trying using the Printer.Print PictureBox.Picture but nothing happen. I hope someone can help me.

    Thanks in advance and regards.
    Angel Maldonado López.
    VB Programmer

  2. #2
    Fanatic Member laserman's Avatar
    Join Date
    Jan 2002
    Location
    Wales U.K
    Posts
    775
    If you want to print the box and form would this help you

    VB Code:
    1. form1.PrintForm

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Jan 1999
    Location
    México, D.F.
    Posts
    84
    Ummm... I just want to print the picture box only, like a document in Word.
    Angel Maldonado López.
    VB Programmer

  4. #4
    Fanatic Member laserman's Avatar
    Join Date
    Jan 2002
    Location
    Wales U.K
    Posts
    775
    Ok

    Try setting the borderstyle of the box to none.
    not to have the button on the screen when it prints why dont you have the button on another form and then
    do

    Form1.PrintForm

    Then you will have the picturebox contents only

    Ps Just came back from Mexico last July

  5. #5
    PowerPoster
    Join Date
    Oct 2002
    Location
    British Columbia
    Posts
    9,758
    Use the global Printer object

    Printer.PaintPicture PictureBox1, 0, 0


    P.S I was in Mexico in Nov, 2000.

  6. #6

    Thread Starter
    Lively Member
    Join Date
    Jan 1999
    Location
    México, D.F.
    Posts
    84
    Yes, I use the PaintPicture in the Print command and receive a message Invalid picture, but I could send to the print like:
    Printer.Paintpicture PictureBox1.Image,0,0 and the problem was resolved. Thanks a lot both of you.

    Bruce, when you come again to Mexico, contact me to show this biggest city, in population of course.
    Angel Maldonado López.
    VB Programmer

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